Vulnerabilities in pkg:pypi/pdfkit
PACKAGECVE-2025-26240 is a HIGH (CVSS 8.4) path traversal vulnerability (CWE-120: Buffer Copy without Checking Size of Input ('Classic Buffer Overflow')) affecting pdfkit libraries in the PyPI ecosystem. The issue involves path traversal in from_string. Remediation is available in the latest vendor maintenance releases.
pkg:pypi/pdfkit
Vulnerability advisories affecting package pkg:pypi/pdfkit. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-9g3x-6x24-vf9f | CVE-2025-26240 | HIGH | pdfkit: Path traversal in from_string |
CVE-2025-26240 at a Glance
Security Impact
CVSS: 8.4
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2025-26240
To remediate this vulnerability, upgrade all affected pdfkit dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install pdfkit>=Latest secure release
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show pdfkit
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2025-26240, inspect your installed packages using pip:
pip show pdfkit
Analyze the terminal output to locate any version of pdfkit in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.
Note: The pip show pdfkit command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-120: Buffer Copy without Checking Size of Input ('Classic Buffer Overflow'), where the product copies an input buffer to an output buffer without verifying that the size of the input buffer is less than the size of the output buffer. In pdfkit, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-26240 Affected pdfkit Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
pdfkit
|
PyPI |
≤ 1.0.0
|
|
References
Frequently Asked Questions
What is CVE-2025-26240?
Which pdfkit versions are affected?
What version fixes CVE-2025-26240?
Is pdfkit affected?
What is the CVSS score of CVE-2025-26240?
What CWE is associated with CVE-2025-26240?
How can I check PyPI dependencies for CVE-2025-26240?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-9g3x-6x24-vf9f",
"modified" : "2026-06-18T14:38:10Z",
"published" : "2026-06-17T18:35:56Z",
"aliases" : [ "CVE-2025-26240" ],
"summary" : "pdfkit: Path traversal in from_string",
"details" : "In JazzCore python-pdfkit 1.0.0, the from_string method enables the execution of JavaScript code within the context of the server application and the exfiltration of local files.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "pdfkit"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "1.0.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-26240"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/JazzCore/python-pdfkit"
}, {
"type" : "WEB",
"url" : "https://habuon.github.io/2025/03/12/pdfkit-vulnerability-%28CVE-2025-26240%29.html"
}, {
"type" : "WEB",
"url" : "https://www.csirt.gov.sk/the-python-pdfkit-library-vulnerability.html"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-120", "CWE-22" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-06-18T14:38:10Z",
"nvd_published_at" : "2026-06-17T17:16:38Z"
}
}