🇰🇷 한글 설명
Nginx UI 2.0.0-rc.6부터 2.4.1 버전 사이에서 MCP 도구인 nginx_config_add가 설정 파일 검증 과정을 누락하는 취약점이 발견되었습니다. 인증된 공격자는 이를 악용하여 차단된 위험한 지시어를 포함한 설정 파일을 작성할 수 있으며, 특정 모듈이 로드된 경우 원격 코드 실행(RCE)이 가능합니다.
💡 쉬운 설명
Nginx UI의 설정 저장 과정에서 보안 검사를 건너뛰는 허점이 발견되었습니다. 해커가 권한을 얻으면 서버에 위험한 명령어를 심어 컴퓨터를 마음대로 조종할 수 있습니다.
🇺🇸 원문 (English)
Nginx UI is a web user interface for the Nginx web server. From 2.0.0-rc.6 until 2.4.1, the MCP tool nginx_config_add writes nginx configuration files to disk and triggers an nginx reload without calling config.ValidateConfigFile. The identical flow in the REST API (POST /api/configs) does call that function and correctly rejects dangerous directives. An authenticated attacker can exploit this gap to write config files containing any blocked directive (perl, js_import, load_module, user root, etc.), bypassing nginx-ui's entire security layer. On a server with the nginx Perl, njs, or Lua module loaded, this is post-authentication Remote Code Execution. This issue is fixed in version 2.4.1.
📍 영향받는 시스템
Nginx UI version 2.0.0-rc.6 ~ 2.4.1
⚔️ 공격 벡터
인증된 공격자가 MCP 도구 또는 특정 API를 통해 검증되지 않은 설정 지시어를 주입하여 파일 작성
🛡️ 대응 방법
Nginx UI를 최신 보안 패치가 적용된 버전 2.4.1 이상으로 업데이트하십시오.
🔧 검증 코드
출력된 버전이 2.4.1 미만(2.0.0-rc.6 포함)인지 확인하여 취약 여부를 판단합니다.
nginx-ui --version 2>/dev/null || dpkg -l | grep nginx-ui 2>/dev/null