🇰🇷 한글 설명
WordPress용 NextGEN Gallery 플러그인 4.4.1 이하 버전에는 legacy_render 함수를 통한 원격 코드 실행 취약점이 존재합니다. Lightroom gallery_edit 엔드포인트의 권한 검증 누락, 갤러리 경로의 대량 할당(mass assignment), 등록된 템플릿 디렉터리로의 무제한 파일 업로드가 결합되어 있으며, 확장자 검사가 부분 문자열 일치로 이루어져 .php_ 파일명이 템플릿으로 허용됩니다. 커스텀 권한 이상의 인증된 공격자가 서버에서 코드를 실행할 수 있습니다.
💡 쉬운 설명
로그인한 사용자가 자신이 만든 사진 갤러리를 조작해 웹사이트 서버에 악성 코드를 심을 수 있는 문제입니다. 이를 통해 공격자가 서버를 장악할 수 있으므로 즉시 플러그인을 업데이트해야 합니다.
🇺🇸 원문 (English)
The Photo Gallery, Sliders, Proofing and Themes – NextGEN Gallery plugin for WordPress is vulnerable to Remote Code Execution in all versions up to, and including, 4.4.1 via the legacy_render function. This is due to broken authorization on the Lightroom gallery_edit endpoint combined with mass assignment of gallery path and unrestricted file upload into a registered template directory, whose extension check uses a substring match that accepts sanitized .php_ filenames as valid templates. This makes it possible for authenticated attackers, with custom-level access and above, to execute code on the server. Exploitation requires the authenticated attacker to be the stored author of at least one existing NextGEN gallery, as ownership of that gallery is the sole authorization check gating the mass-assignment and upload steps.
📍 영향받는 시스템
WordPress NextGEN Gallery 플러그인 4.4.1 이하 모든 버전
⚔️ 공격 벡터
커스텀 권한 이상의 인증된 사용자가 자신이 작성한 갤러리를 이용해 gallery_edit 엔드포인트로 경로를 변경하고 .php_ 확장자 파일을 템플릿 디렉터리에 업로드하여 코드를 실행
🛡️ 대응 방법
NextGEN Gallery 플러그인을 4.4.1 초과 버전(패치된 버전)으로 즉시 업데이트하고, 불필요한 사용자 권한을 축소
🔧 검증 코드
출력된 버전이 4.4.1 이하이면 취약하므로 업데이트가 필요하고, 4.4.1을 초과하면 패치된 것으로 판단합니다.
wp plugin get nextgen-gallery --field=version 2>/dev/null || grep -i 'Version:' wp-content/plugins/nextgen-gallery/*.php 2>/dev/null | head -1