🇰🇷 한글 설명
MapServer 6.0부터 8.6.4 버전까지 OpenLayers HTML 출력 시 공격자가 제어 가능한 X-Forwarded-Host 값을 적절히 이스케이프 처리하지 않아 발생하는 취약점입니다. 공격자는 특수하게 조작된 URL을 통해 피해자의 브라우저에서 임의의 자바스크립트를 실행할 수 있습니다.
💡 쉬운 설명
웹 지도를 보여주는 프로그램에서 외부에서 전달된 주소 정보를 검증 없이 사용하면서 발생하는 보안 허점입니다. 해커가 만든 악성 링크를 클릭하면 사용자의 로그인 정보나 개인 데이터가 탈취될 수 있습니다.
🇺🇸 원문 (English)
MapServer is a system for developing web-based GIS applications. From 6.0 until 8.6.4, MapServer's OpenLayers HTML output for SERVICE=WMS&REQUEST=GetMap&FORMAT=application/openlayers reflects an attacker-controlled X-Forwarded-Host value received as HTTP_X_FORWARDED_HOST through msBuildOnlineResource(), processLine(), and the [mapserv_onlineresource] substitution in src/maputil.c and src/maptemplate.c without escaping it for a single-quoted JavaScript string. When the deployment trusts the forwarded header and does not configure a fixed ows_onlineresource or MS_ONLINERESOURCE value, embedded single quotes can escape the generated URL string. An unauthenticated attacker can craft a URL that executes arbitrary JavaScript in the MapServer site origin when opened by a victim, enabling access to sessions or tokens, same-origin data and requests, and actions as the victim. This issue is fixed in version 8.6.4.
📍 영향받는 시스템
MapServer 6.0 ~ 8.6.4
⚔️ 공격 벡터
조작된 X-Forwarded-Host 헤더가 포함된 URL을 통해 피해자에게 클릭을 유도하는 방식
🛡️ 대응 방법
MapServer를 최신 보안 패치가 적용된 버전인 8.6.4 이상으로 업데이트하십시오.
🔧 검증 코드
출력된 버전 번호가 8.6.4 미만인 경우 해당 취약점에 노출된 상태입니다.
mapserv -version 2>/dev/null || echo 'MapServer not found in PATH'