🔍 CVE-2025-68428

7.5
CVSS Score
HIGH
2026-01-05
2026-10-07 10:10
✅ 완료

🇰🇷 한글 설명

jsPDF 4.0.0 미만 버전의 Node.js 빌드에서 loadFile 메서드의 첫 번째 인자를 사용자가 제어할 수 있을 때 로컬 파일 포함(LFI) 및 경로 탐색 취약점이 발생합니다. 공격자는 검증되지 않은 경로를 전달하여 Node.js 프로세스가 실행 중인 로컬 파일 시스템의 임의 파일 내용을 읽고 PDF에 포함시킬 수 있습니다. 이 취약점은 addImage, html, addFont 메서드에서도 발생할 수 있습니다.

💡 쉬운 설명

PDF를 만드는 프로그램의 허점을 이용해 컴퓨터 안에 있는 중요한 파일을 몰래 읽어낼 수 있는 문제입니다. 공격자가 파일 경로를 조작하면 사용자가 모르는 사이에 시스템 내부 파일이 PDF 문서에 담겨 유출될 수 있습니다.

🇺🇸 원문 (English)

jsPDF is a library to generate PDFs in JavaScript. Prior to version 4.0.0, user control of the first argument of the loadFile method in the node.js build allows local file inclusion/path traversal. If given the possibility to pass unsanitized paths to the loadFile method, a user can retrieve file contents of arbitrary files in the local file system the node process is running in. The file contents are included verbatim in the generated PDFs. Other affected methods are `addImage`, `html`, and `addFont`. Only the node.js builds of the library are affected, namely the `dist/jspdf.node.js` and `dist/jspdf.node.min.js` files. The vulnerability has been fixed in [email protected]. This version restricts file system access per default. This semver-major update does not introduce other breaking changes. Some workarounds areavailable. With recent node versions, jsPDF recommends using the `--permission` flag in production. The feature was introduced experimentally in v20.0.0 and is stable since v22.13.0/v23.5.0/v24.0.0. For older node versions, sanitize user-provided paths before passing them to jsPDF.

📍 영향받는 시스템

jsPDF Node.js 빌드 (dist/jspdf.node.js, dist/jspdf.node.min.js) 4.0.0 미만 버전

⚔️ 공격 벡터

loadFile, addImage, html, addFont 메서드에 검증되지 않은 파일 경로를 입력하여 로컬 파일 접근

🛡️ 대응 방법

jsPDF를 4.0.0 이상 버전으로 업데이트하거나, 입력 경로를 엄격히 검증하고 Node.js 실행 시 --permission 플래그를 사용하십시오.

🔧 검증 코드

출력된 jspdf의 버전이 4.0.0 미만인지 확인하십시오.

Shell / Script
npm list jspdf

📊 CVSS Vector String

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

💻 영향받는 소프트웨어

Node.js