{"answers":{"affected":"2 open source packages ship an affected version, including beautiful-mermaid.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-26226 exists.","fix":"Upgrade beautiful-mermaid to 0.1.3 or later.","what":"CVE-2026-26226 is a medium-severity cross-site scripting vulnerability in lukilabs beautiful-mermaid, published on 13 Feb 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2026-26226 and fix it if it is affected.\n\nWhat it is: CVE-2026-26226 is a medium-severity cross-site scripting vulnerability in lukilabs beautiful-mermaid, published on 13 Feb 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-26226 exists.\n\nAffected packages and fixed versions:\n- beautiful-mermaid (npm): affected all versions; fixed in 0.1.3\n- beautiful-mermaid (npm): affected all versions; fixed in 0.1.3\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-2026-26226/ (Markdown: https://insights.sbomify.com/CVE-2026-26226/index.md)","id":"CVE-2026-26226","markdown":"https://insights.sbomify.com/CVE-2026-26226/index.md","name":"CVE-2026-26226","record":{"aliases":["GHSA-cgmm-x5ww-q5cr"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"Mermaid rendering library","requires_auth":"none","summary":"Attackers can inject malicious SVG attributes via Mermaid diagrams, leading to cross-site scripting and script execution in the embedding origin.","user_interaction":"required","vuln_class":"xss"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"VulnCheck","cpe":[],"cvss":{"score":5.3,"severity":"medium","source":"cna","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N","version":"4.0"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"description":"beautiful-mermaid versions prior to 0.1.3 contain an SVG attribute injection issue that can lead to cross-site scripting (XSS) when rendering attacker-controlled Mermaid diagrams. User-controlled values from Mermaid style and classDef directives are interpolated into SVG attribute values without proper escaping, allowing crafted input to break out of an attribute context and inject arbitrary SVG elements/attributes into the rendered output. When the generated SVG is embedded in a web page, this can result in script execution in the context of the embedding origin.","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":"beautiful-mermaid \u003c 0.1.3 SVG Attribute Injection","id":"CVE-2026-26226","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"xss","year":"2026"},"n_packages":2,"n_references":4,"next":{"headline":"VLC for Android \u003c 3.7.0 Remote Access OTP Authentication Bypass","id":"CVE-2026-26227"},"packages":[{"ecosystem":"npm","fixed":["0.1.3"],"introduced":["0"],"last_affected":[],"package":"beautiful-mermaid","purl":null,"source":"GHSA-cgmm-x5ww-q5cr"},{"ecosystem":"npm","fixed":["0.1.3"],"introduced":["0"],"last_affected":[],"package":"beautiful-mermaid","purl":"pkg:npm/beautiful-mermaid","source":"GHSA-cgmm-x5ww-q5cr"}],"prev":{"headline":"Intego Personal Backup Task File Privilege Escalation","id":"CVE-2026-26225"},"products":["beautiful-mermaid"],"published":"2026-02-13","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":"no","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2026-10-08","vendors":["lukilabs"]},"summary":"Attackers can inject malicious SVG attributes via Mermaid diagrams, leading to cross-site scripting and script execution in the embedding origin.","url":"https://insights.sbomify.com/CVE-2026-26226/"}