🇰🇷 한글 설명
Stirling-PDF 2.13.1부터 2.13.2 버전까지 POST /api/v1/convert/svg/pdf 엔드포인트는 공격자가 제공한 SVG를 Apache Batik으로 렌더링하며, 스킴이 없는 루트 상대 이미지 참조가 SvgSanitizer.isExternalUrl() 검사를 우회해 file:///input.svg 기준의 로컬 파일로 해석됩니다. 이로 인해 sanitization이 활성화된 상태에서 이미지로 디코딩 가능한 서버 파일(PNG, JPG, GIF, SVG)이 반환되는 PDF에 포함될 수 있으며, 로그인이 비활성화된 배포본에서는 인증 없이, 로그인이 활성화된 경우에는 관리자가 아닌 사용자도 악용할 수 있습니다. 이 취약점은 2.13.2 버전에서 수정되었습니다.
💡 쉬운 설명
PDF 변환 기능에 SVG 파일을 이용한 공격 경로가 있어, 서버 안의 일부 이미지 파일 내용이 외부로 노출될 수 있습니다. 이 문제는 2.13.2 버전에서 고쳐졌으니 업데이트가 필요합니다.
🇺🇸 원문 (English)
Stirling-PDF is a locally hosted web application that facilitates various operations on PDF files. From 2.13.1 until 2.13.2, the POST /api/v1/convert/svg/pdf endpoint renders attacker-supplied SVG through Apache Batik, and a scheme-less root-relative image reference bypasses SvgSanitizer.isExternalUrl() before Batik resolves it against the file:///input.svg document base as a same-origin local file. The convert() and addSvgAsPage() paths in app/core/src/main/java/stirling/software/SPDF/utils/SvgToPdf.java can then render image-decodable server files into the returned PDF when sanitization is enabled, including without authentication on login-disabled deployments or with non-admin access when login is enabled. The issue discloses PNG, JPG, GIF, or SVG content and provides an existence oracle only for image-decodable paths; plain text, binary files, directories, XInclude text, external entities, explicit file URLs, and tested HTTP references are not disclosed through this mechanism. This issue is fixed in version 2.13.2.
📍 영향받는 시스템
Stirling-PDF 2.13.1 ~ 2.13.2 미만 버전
⚔️ 공격 벡터
조작된 SVG 파일을 /api/v1/convert/svg/pdf에 업로드하여 상대 경로 이미지 참조로 서버의 로컬 이미지 파일을 PDF에 포함시킴
🛡️ 대응 방법
Stirling-PDF를 2.13.2 이상 버전으로 업데이트
🔧 검증 코드
출력된 버전이 2.13.2 이상이면 취약하지 않으며, 2.13.1 이상 2.13.2 미만이면 취약하므로 즉시 업데이트해야 합니다. 명령 결과가 없으면 설치 경로를 직접 확인하세요.
docker inspect --format '{{index .Config.Labels "org.opencontainers.image.version"}}' stirling-pdf 2>/dev/null || grep -rh 'version' ./pom.xml 2>/dev/null | head -1
📊 CVSS Vector String
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
💻 영향받는 소프트웨어
IBM WebSphere Application Server