🇰🇷 한글 설명
WeasyPrint 70.0 미만 버전에서 xmp_metadata 또는 stylesheets 옵션을 통해 서버 측의 URL 제한을 우회할 수 있는 취약점이 발견되었습니다. 공격자가 조작된 HTML 값을 전달할 경우, 내부 파일 읽기나 로컬 리소스 로딩을 통해 민감한 정보가 PDF에 포함될 수 있습니다.
💡 쉬운 설명
웹 페이지를 PDF로 만들어주는 프로그램의 보안 설정이 제대로 작동하지 않는 문제입니다. 해커가 특수한 코드를 보내면 서버 안에 있는 중요한 파일을 몰래 PDF 파일에 담아 가져갈 수 있습니다.
🇺🇸 원문 (English)
WeasyPrint helps web developers to create PDF documents. Prior to 70.0, server-side applications that configure a restrictive url_fetcher and pass attacker-influenced values to HTML.write_pdf() can have the restriction bypassed through the xmp_metadata or stylesheets options. In weasyprint/pdf/init.py, xmp_metadata calls select_source() without the document url_fetcher, allowing an accessible local file to be read and embedded verbatim in the output PDF. In weasyprint/document.py, stylesheets constructs CSS() without the document url_fetcher, allowing local or internal resource loading and propagating the permissive fetcher through nested CSS imports and url() references. The stylesheets channel applies fetched resources but does not by itself disclose stylesheet comments verbatim. This issue is fixed in version 70.0.
📍 영향받는 시스템
WeasyPrint 70.0 미만 모든 버전
⚔️ 공격 벡터
공격자가 조작된 HTML 값을 HTML.write_pdf() 함수에 전달하여 xmp_metadata 또는 stylesheets 옵션을 통해 로컬 파일에 접근
🛡️ 대응 방법
WeasyPrint를 최신 버전인 70.0 이상으로 업데이트하십시오.
🔧 검증 코드
출력된 버전 번호가 70.0 미만이면 취약한 상태입니다.
pip show weasyprint | grep Version
📊 CVSS Vector String
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
💻 영향받는 소프트웨어
IBM WebSphere Application Server