{"answers":{"affected":"2 open source packages ship an affected version, including md-to-pdf.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-65108 exists.","fix":"Upgrade md-to-pdf to 5.2.5 or later.","what":"CVE-2025-65108 is a critical code injection vulnerability in simonhaenisch md-to-pdf, published on 21 Nov 2025. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2025-65108 and fix it if it is affected.\n\nWhat it is: CVE-2025-65108 is a critical code injection vulnerability in simonhaenisch md-to-pdf, published on 21 Nov 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-65108 exists.\n\nAffected packages and fixed versions:\n- md-to-pdf (npm): affected all versions; fixed in 5.2.5\n- md-to-pdf (npm): affected all versions; fixed in 5.2.5\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-65108/ (Markdown: https://insights.sbomify.com/CVE-2025-65108/index.md)","id":"CVE-2025-65108","markdown":"https://insights.sbomify.com/CVE-2025-65108/index.md","name":"CVE-2025-65108","record":{"aliases":["GHSA-547r-qmjm-8hvw"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"Markdown to PDF library","requires_auth":"none","summary":"Attackers can execute arbitrary code by crafting malicious Markdown front matter, affecting users of the md-to-pdf library.","user_interaction":"not_required","vuln_class":"code_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":10,"severity":"critical","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-94","name":"Improper Control of Generation of Code"}],"description":"md-to-pdf is a CLI tool for converting Markdown files to PDF using Node.js and headless Chrome. Prior to version 5.2.5, a Markdown front-matter block that contains JavaScript delimiter causes the JS engine in gray-matter library to execute arbitrary code in the Markdown to PDF converter process of md-to-pdf library, resulting in remote code execution. This issue has been patched in version 5.2.5.","ecosystems":["npm"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"md-to-pdf is vulnerable to arbitrary JavaScript code execution when parsing front matter","id":"CVE-2025-65108","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"code_injection","year":"2025"},"n_packages":2,"n_references":2,"next":{"headline":"Minder does not sandbox http.send in Rego programs","id":"CVE-2025-65109"},"packages":[{"ecosystem":"npm","fixed":["5.2.5"],"introduced":["0"],"last_affected":[],"package":"md-to-pdf","purl":null,"source":"GHSA-547r-qmjm-8hvw"},{"ecosystem":"npm","fixed":["5.2.5"],"introduced":["0"],"last_affected":[],"package":"md-to-pdf","purl":"pkg:npm/md-to-pdf","source":"GHSA-547r-qmjm-8hvw"}],"prev":{"headline":"Langfuse SSO Account Takeover via CSRF or phishing attack","id":"CVE-2025-65107"},"products":["md-to-pdf"],"published":"2025-11-21","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":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"yes","exploitation":"poc","technical_impact":"total"},"state":"PUBLISHED","updated":"2025-11-24","vendors":["simonhaenisch"]},"summary":"Attackers can execute arbitrary code by crafting malicious Markdown front matter, affecting users of the md-to-pdf library.","url":"https://insights.sbomify.com/CVE-2025-65108/"}