{"answers":{"affected":"4 open source packages ship an affected version, including @excalidraw/excalidraw and @excalidraw/mermaid-to-excalidraw.","exploited":"There is no known exploitation of GHSA-39h7-pwv7-rc3x in the wild and no public exploit code.","fix":"Upgrade @excalidraw/excalidraw to 0.18.1 or later.","what":"GHSA-39h7-pwv7-rc3x is a cross-site scripting vulnerability in @excalidraw/excalidraw, published on 24 Apr 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 GHSA-39h7-pwv7-rc3x and fix it if it is affected.\n\nWhat it is: GHSA-39h7-pwv7-rc3x is a cross-site scripting vulnerability in @excalidraw/excalidraw, published on 24 Apr 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: There is no known exploitation of GHSA-39h7-pwv7-rc3x in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- @excalidraw/excalidraw (npm): affected from 0.18.0; fixed in 0.18.1\n- @excalidraw/excalidraw (npm): affected from 0.18.0; fixed in 0.18.1\n- @excalidraw/mermaid-to-excalidraw (npm): affected from 0.3.0; fixed in 1.1.3\n- @excalidraw/mermaid-to-excalidraw (npm): affected from 0.3.0; fixed in 1.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/GHSA-39h7-pwv7-rc3x/ (Markdown: https://insights.sbomify.com/GHSA-39h7-pwv7-rc3x/index.md)","id":"GHSA-39h7-pwv7-rc3x","markdown":"https://insights.sbomify.com/GHSA-39h7-pwv7-rc3x/index.md","name":"GHSA-39h7-pwv7-rc3x","record":{"aliases":[],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"Excalidraw npm package","requires_auth":"none","summary":"Attackers can execute arbitrary JavaScript in Excalidraw by tricking users into pasting malicious Mermaid diagrams, requiring an upgrade to the patched library version.","user_interaction":"required","vuln_class":"xss"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"### Impact\n\n`@excalidraw/excalidraw@0.18.0` depends on a Mermaid conversion package version that resolves to a Mermaid release affected by CVE-2025-54881 / GHSA-7rqq-prvp-x9jh. User-supplied Mermaid sequence diagram labels could trigger XSS through Mermaid’s KaTeX label rendering path.\n\nThis is patched in `@excalidraw/excalidraw@0.18.1` by updating `@excalidraw/mermaid-to-excalidraw` to `2.2.2`, which uses a patched Mermaid 11 release.\n\nModerate severity as this XSS requires manual user action - pasting unsafe Mermaid diagram into the Excalidraw editor. No semi-automated attack vector exists by default (such as accessing a link).\n\n### Patches\n\n- Stable `@excalidraw/excalidraw@0.18.1` is patched.\n- Unstable `@excalidraw/excalidraw@next` has resolved to patched builds since `@excalidraw/excalidraw@0.18.0-f29edf` on 2025-08-21.\n- Direct consumers of `@excalidraw/mermaid-to-excalidraw` should use `1.1.3` or later.\n\n### Workarounds\n\nNone.\n\n### Resources\n\n- Upstream Mermaid advisory: https://github.com/mermaid-js/mermaid/security/advisories/GHSA-7rqq-prvp-x9jh\n- CVE-2025-54881","ecosystems":["npm"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"Excalidraw vulnerable to XSS via Mermaid sequence diagram labels (KaTeX rendering)","id":"GHSA-39h7-pwv7-rc3x","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"npm","product":null,"products":[],"type":"xss","year":"2026"},"n_packages":4,"n_references":null,"packages":[{"ecosystem":"npm","fixed":["0.18.1"],"introduced":["0.18.0"],"last_affected":[],"package":"@excalidraw/excalidraw","purl":null,"source":"GHSA-39h7-pwv7-rc3x"},{"ecosystem":"npm","fixed":["0.18.1"],"introduced":["0.18.0"],"last_affected":[],"package":"@excalidraw/excalidraw","purl":"pkg:npm/%40excalidraw/excalidraw","source":"GHSA-39h7-pwv7-rc3x"},{"ecosystem":"npm","fixed":["1.1.3"],"introduced":["0.3.0"],"last_affected":[],"package":"@excalidraw/mermaid-to-excalidraw","purl":null,"source":"GHSA-39h7-pwv7-rc3x"},{"ecosystem":"npm","fixed":["1.1.3"],"introduced":["0.3.0"],"last_affected":[],"package":"@excalidraw/mermaid-to-excalidraw","purl":"pkg:npm/%40excalidraw/mermaid-to-excalidraw","source":"GHSA-39h7-pwv7-rc3x"}],"products":null,"published":"2026-04-24","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"Attackers can execute arbitrary JavaScript in Excalidraw by tricking users into pasting malicious Mermaid diagrams, requiring an upgrade to the patched library version.","url":"https://insights.sbomify.com/GHSA-39h7-pwv7-rc3x/"}