{"answers":{"affected":"3 open source packages ship an affected version, including pdfkit.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-26240 exists.","fix":"Upgrade to a fixed version.","what":"CVE-2025-26240 is a high-severity code injection vulnerability in n/a, published on 17 Jun 2026. It can only be exploited from the same machine or local network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2025-26240 and fix it if it is affected.\n\nWhat it is: CVE-2025-26240 is a high-severity code injection vulnerability in n/a, published on 17 Jun 2026. It can only be exploited from the same machine or local network, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-26240 exists.\n\nAffected packages and fixed versions:\n- pdfkit (PyPI): affected all versions up to 1.0.0; no fix listed\n- pdfkit (PyPI): affected all versions up to 1.0.0; no fix listed\n- pdfkit (PyPI): affected all versions up to 1.0.0; no fix listed\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2025-26240/ (Markdown: https://insights.sbomify.com/CVE-2025-26240/index.md)","id":"CVE-2025-26240","markdown":"https://insights.sbomify.com/CVE-2025-26240/index.md","name":"CVE-2025-26240","record":{"aliases":["CLSA-2026-1772496734","DEBIAN-CVE-2025-26240","GHSA-9g3x-6x24-vf9f","PYSEC-2026-2860","UBUNTU-CVE-2025-26240"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution","data_read"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"Python PDF generation library","requires_auth":"none","summary":"Attackers can execute arbitrary JavaScript and read local files via the from_string method in python-pdfkit, requiring an upgrade to mitigate.","user_interaction":"not_required","vuln_class":"code_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"mitre","cpe":[],"cvss":{"score":8.4,"severity":"high","source":"cisa-adp","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-120","name":"Buffer Copy without Checking Size of Input"}],"description":"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.","ecosystems":["PyPI"],"exploits":{"exploitdb":0,"first_seen":"2025-03-12","github_poc":1,"max_poc_stars":1,"metasploit":0,"nuclei":0,"refs":[{"date":"2025-03-12T14:09:01Z","kind":"github_poc","ref":"https://github.com/Habuon/CVE-2025-26240","stars":1,"title":"POC for CVE-2025-26240"}],"tier":"weaponised"},"has_fix":true,"headline":"pdfkit: Path traversal in from_string","id":"CVE-2025-26240","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"code_injection","year":"2025"},"n_packages":3,"n_references":2,"next":{"headline":"SQL injection in n/a","id":"CVE-2025-26241"},"packages":[{"ecosystem":"PyPI","fixed":[],"introduced":["0"],"last_affected":["1.0.0"],"package":"pdfkit","purl":null,"source":"GHSA-9g3x-6x24-vf9f"},{"ecosystem":"PyPI","fixed":[],"introduced":["0"],"last_affected":["1.0.0"],"package":"pdfkit","purl":"pkg:pypi/pdfkit","source":"GHSA-9g3x-6x24-vf9f"},{"ecosystem":"PyPI","fixed":[],"introduced":["0"],"last_affected":["1.0.0"],"package":"pdfkit","purl":"pkg:pypi/pdfkit","source":"PYSEC-2026-2860"}],"prev":{"headline":"Code injection in n/a","id":"CVE-2025-26238"},"products":["n/a"],"published":"2026-06-17","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"total"},"state":"PUBLISHED","updated":"2026-06-17","vendors":["n/a"]},"summary":"Attackers can execute arbitrary JavaScript and read local files via the from_string method in python-pdfkit, requiring an upgrade to mitigate.","url":"https://insights.sbomify.com/CVE-2025-26240/"}