Staging Environment: Content and features may be unstable or change without notice.
Search for packages
Package details: pkg:deb/debian/node-mermaid@8.7.0%2Bds%2B~cs27.17.17-3%2Bdeb11u2?distro=bullseye
purl pkg:deb/debian/node-mermaid@8.7.0%2Bds%2B~cs27.17.17-3%2Bdeb11u2?distro=bullseye
Vulnerabilities affecting this package (0)
Vulnerability Summary Fixed by
This package is not known to be affected by vulnerabilities.
Vulnerabilities fixed by this package (5)
Vulnerability Summary Aliases
VCID-dmks-9n4b-vkh6 Mermaid does not properly sanitize architecture diagram iconText leading to XSS ### Summary In the default configuration of mermaid 11.9.0, user supplied input for architecture diagram icons is passed to the d3 `html()` method, creating a sink for cross site scripting. ### Details Architecture diagram service `iconText` values are passed to the d3 `html()` method, allowing malicious users to inject arbitrary HTML and cause XSS when mermaid-js is used in it's default configuration. The vulnerability lies here: ```ts export const drawServices = async function ( db: ArchitectureDB, elem: D3Element, services: ArchitectureService[] ): Promise<number> { for (const service of services) { /** ... **/ } else if (service.iconText) { bkgElem.html( `<g>${await getIconSVG('blank', { height: iconSize, width: iconSize, fallbackPrefix: architectureIcons.prefix })}</g>` ); const textElemContainer = bkgElem.append('g'); const fo = textElemContainer .append('foreignObject') .attr('width', iconSize) .attr('height', iconSize); const divElem = fo .append('div') .attr('class', 'node-icon-text') .attr('style', `height: ${iconSize}px;`) .append('div') .html(service.iconText); // <- iconText passed into innerHTML /** ... **/ }; }; ``` This issue was introduced with 734bde38777c9190a5a72e96421c83424442d4e4, around 15 months ago, which was released in [v11.1.0](https://github.com/mermaid-js/mermaid/releases/tag/mermaid%4011.1.0). ### PoC Render the following diagram and observe the modified DOM. ``` architecture-beta group api(cloud)[API] service db "<img src=x onerror=\"document.write(`xss on ${document.domain}`)\">" [Database] in api ``` Here is a PoC on mermaid.live: https://mermaid.live/edit#pako:eNo9T8FOwzAM_ZXI4rBJpWrpRtuIISF24caZZdKyxOsiLUnlJjCo-u9kQ8wX-_n5-dkjKK8ROEhSRxNQhUh4v8cghWMpOvKxZ7I3M3XyUc83L-9v2z9qQPo0CpneMwFPxnZsILU6M--QyNNKCAHaq2jRhfyL0vLZ7jwMiWd3443Q3krjpt38Mv4sgG3WMsi9HHDLjLs4CwcZdGQ08EARM7BISZMgjJdLBIQjWhTAU6nxIOMpCBBuSrJeug_v7b8yPdMdgR_kaUgo9loGXBvZkbS3LqHTSK8-ugC8LMrrEuAjnIEvlnlVL9q6rZu6Lh-rRQbfwKuyyZuybcvqIaWiqKcMfq6uRd7Uy-kXhYFzcA ### Impact XSS on all sites that use mermaid and render user supplied diagrams without further sanitization. ### Remediation Sanitize the value of `iconText` before passing it to `html()`. CVE-2025-54880
GHSA-8gwm-58g9-j8pw
VCID-fgz4-kbun-23bn Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') Mermaid is a Javascript based diagramming and charting tool that uses Markdown-inspired text definitions and a renderer to create and modify complex diagrams., malicious diagrams can run javascript code at diagram readers' machines. Users should upgrade to to receive a patch. There are no known workarounds aside from upgrading. CVE-2021-43861
GHSA-p3rp-vmj9-gv6v
VCID-q79q-8yzx-p3f6 Mermaid improperly sanitizes sequence diagram labels leading to XSS ### Summary In the default configuration of mermaid 11.9.0, user supplied input for sequence diagram labels is passed to `innerHTML` during calculation of element size, causing XSS. ### Details Sequence diagram node labels with KaTeX delimiters are passed through `calculateMathMLDimensions`. This method passes the full label to `innerHTML` which allows allows malicious users to inject arbitrary HTML and cause XSS when mermaid-js is used in it's default configuration (with KaTeX support enabled). The vulnerability lies here: ```ts export const calculateMathMLDimensions = async (text: string, config: MermaidConfig) => { text = await renderKatex(text, config); const divElem = document.createElement('div'); divElem.innerHTML = text; // XSS sink, text has not been sanitized. divElem.id = 'katex-temp'; divElem.style.visibility = 'hidden'; divElem.style.position = 'absolute'; divElem.style.top = '0'; const body = document.querySelector('body'); body?.insertAdjacentElement('beforeend', divElem); const dim = { width: divElem.clientWidth, height: divElem.clientHeight }; divElem.remove(); return dim; }; ``` The `calculateMathMLDimensions` method was introduced in 5c69e5fdb004a6d0a2abe97e23d26e223a059832 two years ago, which was released in [Mermaid 10.9.0](https://github.com/mermaid-js/mermaid/releases/tag/v10.9.0). ### PoC Render the following diagram and observe the modified DOM. ``` sequenceDiagram participant A as Alice<img src="x" onerror="document.write(`xss on ${document.domain}`)">$$\\text{Alice}$$ A->>John: Hello John, how are you? Alice-)John: See you later! ``` Here is a PoC on mermaid.live: https://mermaid.live/edit#pako:eNpVUMtOwzAQ_BWzyoFKaRTyaFILiio4IK7ckA-1km1iKbaLY6spUf4dJ0AF68uOZ2dm7REqXSNQ6PHDoarwWfDGcMkUudaJGysqceLKkj3hPdl3osJ7IRvSm-qBwcCAaIXGaONRrSsnUdnobITF28PQ954lwXglai25UNNhxWAXBMyXxcGOi-3kL_5k79e73atuFSUv2HWazH1IWn0m3CC5aPf4b3p2WK--BW-4DJCOWzQ3TM0HQmiMqIFa4zAEicZv4iGMsw0D26JEBtS3NR656ywDpiYv869_11r-Ko12TQv0yLveI3eqfcjP111HUNVonrRTFuhdsVgAHWEAmuRxlG7SuEzKMi-yJAnhAjTLIk_EcbFJtuk2y9MphM8lM47KIp--AOZghtU ### Impact XSS on all sites that use mermaid and render user supplied diagrams without further sanitization. ### Remediation The value of the `text` argument for the `calculateMathMLDimensions` method needs to be sanitized before getting passed on to `innerHTML`. CVE-2025-54881
GHSA-7rqq-prvp-x9jh
VCID-x4cs-g2jz-eqb5 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') The package @braintree/sanitize-url before 6.0.0 is vulnerable to Cross-site Scripting (XSS) due to improper sanitization in sanitizeUrl function. CVE-2021-23648
GHSA-hqq7-2q2v-82xq
VCID-x94b-cysu-4fbe Cross-site Scripting in Mermaid Mermaid before 8.11.0 allows XSS when the antiscript feature is used. CVE-2021-35513
GHSA-4f6x-49g2-99fm

Date Actor Action Vulnerability Source VulnerableCode Version
2026-04-16T10:16:03.185588+00:00 Debian Importer Fixing VCID-q79q-8yzx-p3f6 https://security-tracker.debian.org/tracker/data/json 38.4.0
2026-04-16T10:07:38.489460+00:00 Debian Importer Fixing VCID-x94b-cysu-4fbe https://security-tracker.debian.org/tracker/data/json 38.4.0
2026-04-16T10:02:37.977219+00:00 Debian Importer Fixing VCID-x4cs-g2jz-eqb5 https://security-tracker.debian.org/tracker/data/json 38.4.0
2026-04-16T09:38:08.426661+00:00 Debian Importer Fixing VCID-fgz4-kbun-23bn https://security-tracker.debian.org/tracker/data/json 38.4.0
2026-04-16T09:05:43.107878+00:00 Debian Importer Fixing VCID-dmks-9n4b-vkh6 https://security-tracker.debian.org/tracker/data/json 38.4.0
2026-04-13T06:54:22.685468+00:00 Debian Importer Fixing VCID-q79q-8yzx-p3f6 https://security-tracker.debian.org/tracker/data/json 38.3.0
2026-04-13T06:48:05.485910+00:00 Debian Importer Fixing VCID-x94b-cysu-4fbe https://security-tracker.debian.org/tracker/data/json 38.3.0
2026-04-13T06:44:14.796485+00:00 Debian Importer Fixing VCID-x4cs-g2jz-eqb5 https://security-tracker.debian.org/tracker/data/json 38.3.0
2026-04-11T18:24:46.733490+00:00 Debian Importer Fixing VCID-fgz4-kbun-23bn https://security-tracker.debian.org/tracker/data/json 38.3.0
2026-04-11T18:05:37.568014+00:00 Debian Importer Fixing VCID-dmks-9n4b-vkh6 https://security-tracker.debian.org/tracker/data/json 38.3.0
2026-04-03T07:47:11.799909+00:00 Debian Importer Fixing VCID-q79q-8yzx-p3f6 https://security-tracker.debian.org/tracker/data/json 38.1.0
2026-04-03T07:47:11.778501+00:00 Debian Importer Fixing VCID-dmks-9n4b-vkh6 https://security-tracker.debian.org/tracker/data/json 38.1.0
2026-04-03T07:47:11.740602+00:00 Debian Importer Fixing VCID-fgz4-kbun-23bn https://security-tracker.debian.org/tracker/data/json 38.1.0
2026-04-03T07:47:11.718043+00:00 Debian Importer Fixing VCID-x94b-cysu-4fbe https://security-tracker.debian.org/tracker/data/json 38.1.0
2026-04-03T07:47:11.693624+00:00 Debian Importer Fixing VCID-x4cs-g2jz-eqb5 https://security-tracker.debian.org/tracker/data/json 38.1.0