🇰🇷 한글 설명
Apache PDFBox의 ExtractEmbeddedFiles 예제에 경로 순회 취약점이 존재합니다. 이전 보안 패치(CVE-2026-23907)의 불완전한 수정으로, 파일 경로 구분자를 고려하지 않아 쓰기 권한이 있는 디렉토리에서 의도하지 않은 상위 경로로 파일 작성이 가능합니다. 2.0.37 또는 3.0.8 버전으로 업데이트하거나 GitHub PR 427의 패치를 적용해야 합니다.
💡 쉬운 설명
Apache PDFBox의 예제 코드에서 보안 결함이 있어, 악의적인 PDF 파일을 통해 원하지 않는 위치에 파일을 저장할 수 있습니다. 최신 버전으로 업데이트하면 해결됩니다.
🇺🇸 원문 (English)
Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') vulnerability in Apache PDFBox Examples.
This issue affects the
ExtractEmbeddedFiles example in Apache PDFBox: from 2.0.24 through 2.0.36, from 3.0.0 through 3.0.7.
Users are recommended to update to version 2.0.37 or 3.0.8 once
available. Until then, they should apply the fix provided in GitHub PR
427.
The ExtractEmbeddedFiles example contained a path traversal vulnerability (CWE-22) mentioned in CVE-2026-23907. However the change in the releases 2.0.36 and 3.0.7 is flawed because it doesn't consider the file path separator. Because of that, a user having writing rights on /home/ABC could be victim to a malicious PDF resulting in a write attempt to any path starting with /home/ABC, e.g. "/home/ABCDEF".
Users who have copied this example into their production code should apply the mentioned change. The example
has been changed accordingly and is available in the project repository.
📍 영향받는 시스템
Apache PDFBox 2.0.24-2.0.36 및 3.0.0-3.0.7 (ExtractEmbeddedFiles 예제 포함)
⚔️ 공격 벡터
악의적인 PDF 파일의 내장 파일명에 경로 구분자 우회를 통해 허용된 디렉토리 외부로 파일 추출
🛡️ 대응 방법
Apache PDFBox를 2.0.37 이상 또는 3.0.8 이상으로 업데이트하거나, 프로덕션 코드에 적용된 경우 GitHub PR 427의 패치 수동 적용
🔧 검증 코드
2.0.37 미만 또는 3.0.8 미만의 버전이면 취약하며, 2.0.37 이상 또는 3.0.8 이상이면 안전합니다.
dpkg -l apache-pdfbox 2>/dev/null | grep -oP '\d+\.\d+\.\d+' || rpm -qa | grep pdfbox | grep -oP '\d+\.\d+\.\d+'