Lookup for vulnerabilities affecting packages.

Vulnerability_idVCID-dmks-9n4b-vkh6
Summary
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()`.
Aliases
0
alias CVE-2025-54880
1
alias GHSA-8gwm-58g9-j8pw
Fixed_packages
0
url pkg:deb/debian/node-mermaid@0?distro=bullseye
purl pkg:deb/debian/node-mermaid@0?distro=bullseye
is_vulnerable false
affected_by_vulnerabilities
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/node-mermaid@0%3Fdistro=bullseye
1
url 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
is_vulnerable false
affected_by_vulnerabilities
resource_url http://public2.vulnerablecode.io/packages/pkg:deb/debian/node-mermaid@8.7.0%252Bds%252B~cs27.17.17-3%252Bdeb11u2%3Fdistro=bullseye
2
url pkg:npm/mermaid@11.10.0
purl pkg:npm/mermaid@11.10.0
is_vulnerable false
affected_by_vulnerabilities
resource_url http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@11.10.0
Affected_packages
0
url pkg:npm/mermaid@11.1.0
purl pkg:npm/mermaid@11.1.0
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-dmks-9n4b-vkh6
1
vulnerability VCID-q79q-8yzx-p3f6
resource_url http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@11.1.0
1
url pkg:npm/mermaid@11.1.1
purl pkg:npm/mermaid@11.1.1
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-dmks-9n4b-vkh6
1
vulnerability VCID-q79q-8yzx-p3f6
resource_url http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@11.1.1
2
url pkg:npm/mermaid@11.2.0
purl pkg:npm/mermaid@11.2.0
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-dmks-9n4b-vkh6
1
vulnerability VCID-q79q-8yzx-p3f6
resource_url http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@11.2.0
3
url pkg:npm/mermaid@11.2.1
purl pkg:npm/mermaid@11.2.1
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-dmks-9n4b-vkh6
1
vulnerability VCID-q79q-8yzx-p3f6
resource_url http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@11.2.1
4
url pkg:npm/mermaid@11.3.0
purl pkg:npm/mermaid@11.3.0
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-dmks-9n4b-vkh6
1
vulnerability VCID-q79q-8yzx-p3f6
resource_url http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@11.3.0
5
url pkg:npm/mermaid@11.4.0
purl pkg:npm/mermaid@11.4.0
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-dmks-9n4b-vkh6
1
vulnerability VCID-q79q-8yzx-p3f6
resource_url http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@11.4.0
6
url pkg:npm/mermaid@11.4.1
purl pkg:npm/mermaid@11.4.1
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-dmks-9n4b-vkh6
1
vulnerability VCID-q79q-8yzx-p3f6
resource_url http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@11.4.1
7
url pkg:npm/mermaid@11.5.0
purl pkg:npm/mermaid@11.5.0
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-dmks-9n4b-vkh6
1
vulnerability VCID-q79q-8yzx-p3f6
resource_url http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@11.5.0
8
url pkg:npm/mermaid@11.6.0
purl pkg:npm/mermaid@11.6.0
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-dmks-9n4b-vkh6
1
vulnerability VCID-q79q-8yzx-p3f6
resource_url http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@11.6.0
9
url pkg:npm/mermaid@11.7.0
purl pkg:npm/mermaid@11.7.0
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-dmks-9n4b-vkh6
1
vulnerability VCID-q79q-8yzx-p3f6
resource_url http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@11.7.0
10
url pkg:npm/mermaid@11.8.0
purl pkg:npm/mermaid@11.8.0
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-dmks-9n4b-vkh6
1
vulnerability VCID-q79q-8yzx-p3f6
resource_url http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@11.8.0
11
url pkg:npm/mermaid@11.8.1
purl pkg:npm/mermaid@11.8.1
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-dmks-9n4b-vkh6
1
vulnerability VCID-q79q-8yzx-p3f6
resource_url http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@11.8.1
12
url pkg:npm/mermaid@11.9.0
purl pkg:npm/mermaid@11.9.0
is_vulnerable true
affected_by_vulnerabilities
0
vulnerability VCID-dmks-9n4b-vkh6
1
vulnerability VCID-q79q-8yzx-p3f6
resource_url http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@11.9.0
References
0
reference_url https://api.first.org/data/v1/epss?cve=CVE-2025-54880
reference_id
reference_type
scores
0
value 8e-05
scoring_system epss
scoring_elements 0.00771
published_at 2026-04-02T12:55:00Z
1
value 8e-05
scoring_system epss
scoring_elements 0.00761
published_at 2026-04-09T12:55:00Z
2
value 8e-05
scoring_system epss
scoring_elements 0.00769
published_at 2026-04-08T12:55:00Z
3
value 8e-05
scoring_system epss
scoring_elements 0.0077
published_at 2026-04-07T12:55:00Z
4
value 8e-05
scoring_system epss
scoring_elements 0.00802
published_at 2026-04-21T12:55:00Z
5
value 8e-05
scoring_system epss
scoring_elements 0.00753
published_at 2026-04-16T12:55:00Z
6
value 8e-05
scoring_system epss
scoring_elements 0.00751
published_at 2026-04-12T12:55:00Z
7
value 8e-05
scoring_system epss
scoring_elements 0.00757
published_at 2026-04-18T12:55:00Z
8
value 9e-05
scoring_system epss
scoring_elements 0.00918
published_at 2026-04-24T12:55:00Z
url https://api.first.org/data/v1/epss?cve=CVE-2025-54880
1
reference_url https://github.com/mermaid-js/mermaid
reference_id
reference_type
scores
0
value 5.1
scoring_system cvssv4
scoring_elements CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
1
value MODERATE
scoring_system generic_textual
scoring_elements
url https://github.com/mermaid-js/mermaid
2
reference_url https://github.com/mermaid-js/mermaid/commit/2aa83302795183ea5c65caec3da1edd6cb4791fc
reference_id
reference_type
scores
0
value 5.1
scoring_system cvssv4
scoring_elements CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
1
value MODERATE
scoring_system generic_textual
scoring_elements
2
value Track
scoring_system ssvc
scoring_elements SSVCv2/E:P/A:N/T:P/P:M/B:A/M:M/D:T/2025-08-19T17:09:29Z/
url https://github.com/mermaid-js/mermaid/commit/2aa83302795183ea5c65caec3da1edd6cb4791fc
3
reference_url https://github.com/mermaid-js/mermaid/commit/734bde38777c9190a5a72e96421c83424442d4e4
reference_id
reference_type
scores
0
value 5.1
scoring_system cvssv4
scoring_elements CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
1
value MODERATE
scoring_system generic_textual
scoring_elements
2
value Track
scoring_system ssvc
scoring_elements SSVCv2/E:P/A:N/T:P/P:M/B:A/M:M/D:T/2025-08-19T17:09:29Z/
url https://github.com/mermaid-js/mermaid/commit/734bde38777c9190a5a72e96421c83424442d4e4
4
reference_url https://github.com/mermaid-js/mermaid/security/advisories/GHSA-8gwm-58g9-j8pw
reference_id
reference_type
scores
0
value MODERATE
scoring_system cvssv3.1_qr
scoring_elements
1
value 5.1
scoring_system cvssv4
scoring_elements CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
2
value MODERATE
scoring_system generic_textual
scoring_elements
3
value Track
scoring_system ssvc
scoring_elements SSVCv2/E:P/A:N/T:P/P:M/B:A/M:M/D:T/2025-08-19T17:09:29Z/
url https://github.com/mermaid-js/mermaid/security/advisories/GHSA-8gwm-58g9-j8pw
5
reference_url https://nvd.nist.gov/vuln/detail/CVE-2025-54880
reference_id
reference_type
scores
0
value 5.1
scoring_system cvssv4
scoring_elements CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
1
value MODERATE
scoring_system generic_textual
scoring_elements
url https://nvd.nist.gov/vuln/detail/CVE-2025-54880
6
reference_url https://github.com/advisories/GHSA-8gwm-58g9-j8pw
reference_id GHSA-8gwm-58g9-j8pw
reference_type
scores
0
value MODERATE
scoring_system cvssv3.1_qr
scoring_elements
url https://github.com/advisories/GHSA-8gwm-58g9-j8pw
Weaknesses
0
cwe_id 79
name Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
description The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
1
cwe_id 937
name OWASP Top Ten 2013 Category A9 - Using Components with Known Vulnerabilities
description Weaknesses in this category are related to the A9 category in the OWASP Top Ten 2013.
2
cwe_id 1035
name OWASP Top Ten 2017 Category A9 - Using Components with Known Vulnerabilities
description Weaknesses in this category are related to the A9 category in the OWASP Top Ten 2017.
Exploits
Severity_range_score4.0 - 6.9
Exploitability0.5
Weighted_severity6.2
Risk_score3.1
Resource_urlhttp://public2.vulnerablecode.io/vulnerabilities/VCID-dmks-9n4b-vkh6