🇰🇷 한글 설명
ModSecurity 3.0.15부터 3.0.17 이전 버전에서 SecParseXmlIntoArgs가 On 또는 OnlyArgs로 설정된 경우, XML 요청 본문 처리 중 SAX end-element 콜백에서 XMLNodes::parsing_ctx_arg가 초기화되지 않은 채 역참조될 수 있습니다. 인증되지 않은 단일 조작된 HTTP 요청으로 워커가 임의 주소에 상수 값을 쓰게 되어 메모리 손상, 워커 종료, 메모리 노출 또는 실행 흐름 변경이 발생할 수 있습니다. 3.0.x 이전 릴리스와 ModSecurity 2.x는 해당 경로를 사용하지 않아 영향을 받지 않습니다.
💡 쉬운 설명
웹 방화벽 프로그램인 ModSecurity의 XML 처리 부분에 결함이 있어, 공격자가 특별히 만든 웹 요청 하나로 서버 프로세스를 멈추게 하거나 내부 정보를 빼낼 수 있습니다. 3.0.17 이상으로 업데이트하면 이 문제가 해결됩니다.
🇺🇸 원문 (English)
ModSecurity is an open source, cross platform web application firewall (WAF) engine for Apache, IIS and Nginx. From 3.0.15 until 3.0.17, XML request body processing with SecParseXmlIntoArgs set to On or OnlyArgs can leave XMLNodes::parsing_ctx_arg uninitialized in the SAX end-element callback. A single crafted unauthenticated HTTP request can make a worker dereference the pointer, resulting in a constant-value write to an attacker-controlled address. The resulting memory corruption can terminate the worker and may disclose memory or redirect execution. Earlier 3.0.x releases and ModSecurity 2.x do not use the affected path. This issue is fixed in version 3.0.17.
📍 영향받는 시스템
ModSecurity 3.0.15 ~ 3.0.17 미만 (Apache, IIS, Nginx 연동 환경, SecParseXmlIntoArgs On/OnlyArgs 설정 시)
⚔️ 공격 벡터
인증 없이 원격에서 XML 요청 본문이 포함된 조작된 HTTP 요청을 전송하여 메모리 손상을 유발
🛡️ 대응 방법
ModSecurity를 3.0.17 이상으로 업그레이드하거나, 취약 설정인 SecParseXmlIntoArgs를 Off로 변경
🔧 검증 코드
출력된 버전이 3.0.15 이상 3.0.17 미만이면 취약하며, 3.0.17 이상이거나 패키지가 없으면 영향 없음 (rpm 환경은 rpm -q libmodsecurity 사용)
dpkg -l libmodsecurity3 2>/dev/null | grep -E 'libmodsecurity3'