GHSA-x3vm-38hw-55wf · Severity: medium · Ecosystem: npm — Possible inject arbitrary `CSS` into the generated graph affecting the container HTML
Mermaid is a JavaScript based diagramming and charting tool that uses Markdown-inspired text definitions and a renderer to create and modify complex diagrams. An attacker is able to inject arbitrary `CSS` into the generated graph allowing them to change the styling of elements outside of the generated graph, and potentially exfiltrate sensitive information by using specially crafted `CSS` selectors. The following example shows how an attacker can exfiltrate the contents of an input field by bruteforcing the `value` attribute one character at a time. Whenever there is an actual match, an `http` request will be made by the browser in order to "load" a background image that will let an attacker know what's the value of the character. This issue may lead to `Information Disclosure` via CSS selectors and functions able to generate HTTP requests. This also allows an attacker to change the document in ways which may lead a user to perform unintended actions, such as clicking on a link, etc. This issue has been resolved in version 9.1.3. Users are advised to upgrade. Users unable to upgrade should ensure that user input is adequately escaped before embedding it in CSS blocks.
Conclusion & alert: CVE-2022-31108 is rated Exploit Available (50/100): CVSS Medium severity, with medium exploitation likelihood (EPSS 0.76%). Core evidence: 1 public exploit reference(s) are indexed (Exploit-DB). Mandatory action: Public exploits are available—assess exposure, apply mitigations, and prioritize patching.
Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.
| EDB-ID | Source | Kind | Published | Link |
|---|---|---|---|---|
| — | nvd_ref | exploit_tag | Exploit-DB ↗ |
EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).
| # | Date | Old EPSS score | New EPSS score | Delta (New - Old) |
|---|---|---|---|---|
| 1 | 2026-06-15 | 0.22% | 0.76% | +0.54% |
| 2 | 2025-09-16 | 0.32% | 0.22% | -0.10% |
| 3 | 2025-06-29 | — | 0.32% | — |
Full EPSS history (8 records total)
CVSS metrics for this CVE.
| Base score | Version | Severity | Vector | Exploitability | Impact | Score source |
|---|---|---|---|---|---|---|
| 4.1 | 3.1 | MEDIUM |
|
2.3 | 1.4 | [email protected] |
| 6.1 | 3.1 | MEDIUM |
|
2.8 | 2.7 | [email protected] |
| 5.8 | 2.0 | MEDIUM |
|
8.6 | 4.9 | [email protected] |
GHSA-x3vm-38hw-55wf · Severity: medium · Ecosystem: npm — Possible inject arbitrary `CSS` into the generated graph affecting the container HTML
| vendor | priority | summary | link |
|---|---|---|---|
debian
|
not yet assigned | CVE-2022-31108 not yet assigned priority: Debian including 1 source packages (node-mermaid), 1 status rows across 1 suites (bullseye): open 1. | https://security-tracker.debian.org/tracker/CVE-2022-31108 |
ubuntu
|
medium | CVE-2022-31108 medium priority: Ubuntu including 1 source packages (node-mermaid), 14 status rows across 14 suites (bionic, focal, impish, jammy, kinetic, lunar, mantic, noble, oracular, plucky, questing, trusty, upstream, xenial): DNE 10, ignored 2, needs-triage 1, released 1. | https://ubuntu.com/security/CVE-2022-31108 |
| Vendor | Product | Version | Raw CPE |
|---|---|---|---|
| mermaid_project | mermaid | >= 8.0.0, < 9.1.3 | cpe:2.3:a:mermaid_project:mermaid:*:*:*:*:*:node.js:*:* |
| URL | Tags |
|---|---|
| https://github.com/mermaid-js/mermaid/commit/0ae1bdb61adff1cd485caff8c62ec6b8ac57b225 | Patch Third Party Advisory |
| https://github.com/mermaid-js/mermaid/security/advisories/GHSA-x3vm-38hw-55wf | Exploit Third Party Advisory |