🇰🇷 한글 설명
PostgreSQL의 contrib/xml2 모듈에서 libxslt 라이브러리의 보안 옵션이 제대로 적용되지 않아 인증된 사용자가 파일 접근 제어를 우회할 수 있는 취약점입니다. XSLT 처리 및 XML External Entity(XXE) 공격을 통해 민감한 정보 노출이나 임의의 외부 호스트로 트래픽 발생이 가능합니다.
💡 쉬운 설명
PostgreSQL에서 XML 문서를 처리할 때 보안 검사를 제대로 하지 않아, 로그인한 사용자가 서버의 파일을 읽거나 외부 서버와 통신하도록 악의적인 명령을 실행할 수 있습니다. 이를 통해 암호나 개인정보 같은 민감한 정보가 유출될 수 있습니다.
🇺🇸 원문 (English)
The libxslt support in contrib/xml2 in PostgreSQL 8.3 before 8.3.20, 8.4 before 8.4.13, 9.0 before 9.0.9, and 9.1 before 9.1.5 does not properly restrict access to files and URLs, which allows remote authenticated users to modify data, obtain sensitive information, or trigger outbound traffic to arbitrary external hosts by leveraging (1) stylesheet commands that are permitted by the libxslt security options or (2) an xslt_process feature, related to an XML External Entity (aka XXE) issue.
📍 영향받는 시스템
PostgreSQL 8.3.x (8.3.20 이전), 8.4.x (8.4.13 이전), 9.0.x (9.0.9 이전), 9.1.x (9.1.5 이전)
⚔️ 공격 벡터
contrib/xml2의 xslt_process 함수 또는 xml 처리 명령을 이용한 XSLT 스타일시트 공격 및 XXE 공격
🛡️ 대응 방법
PostgreSQL을 8.3.20, 8.4.13, 9.0.9, 9.1.5 이상으로 업그레이드하고 contrib/xml2 확장을 비활성화 또는 신뢰할 수 있는 사용자에게만 접근 권한 제한
🔧 검증 코드
출력된 PostgreSQL 버전이 영향받는 범위에 속하는지 확인하고, contrib/xml2 확장이 설치되어 있으면 SELECT * FROM pg_extension WHERE extname='xml2'; 명령으로 확인할 것
psql -U postgres -c "SELECT version();" | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -1