GHSA-3rrr-jr9j-h3q3 — mermaid
Fix: mermaid-js/mermaid#8022GHSA-3rrr-jr9j-h3q3 is a CWE-1321 vulnerability in mermaid. A fix is available for mermaid — see the affected versions and patch details below.
Mermaid Architecture diagrams are vulnerable to prototype pollution
Exploitation Status
Proof-of-concept exploit code exists
- CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
Exploitation and automatability from CISA’s SSVC triage for GHSA-3rrr-jr9j-h3q3.
EPSS Exploitation Probability
EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.
Real-World Exposure
How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.
mermaidnpmDescription
Rendering an untrusted architecture-beta diagram lets the diagram author write an arbitrary property with the value horizontal or vertical onto Object.prototype. A group id of __proto__ is accepted as a valid parent.
Impact
Any code in the same realm that reads a property of that name from an arbitrary object, or enumerates an object with bare for...in, observes the injected value (which can only be the string horizontal or vertical.
This may mean corrupted option/config defaults, bypassed truthiness checks, causing denial of service or logic corruption in the embedding application.
Because the injected value cannot be an object or function, this is not directly exploitable for remote code execution.
PoC
architecture-beta
group mermaidPrototypePollutionMarker(cloud)[Marker]
service a(server)[A] in __proto__
service b(server)[B] in mermaidPrototypePollutionMarker
a:R -- L:b
The vulnerable write was introduced in commit cb0a4703bdf01d47508bde1c08aa9a980d70bc20 and first shipped in [email protected]. The lines are unchanged in every release since.
Patches
This has been patched by https://github.com/mermaid-js/mermaid/commit/99af3fc35ef0a9a9c8c6314521344d67523ddccf, released in Mermaid v11.16.1
Workarounds
There are no known workarounds. Please update to a patched version.
References
Are there any links users can visit to find out more?
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | mermaid | ≥ 11.5.0&&< 11.16.1 | 11.16.1npm install mermaid@11.16.1 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for mermaid, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update mermaid to 11.16.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-3rrr-jr9j-h3q3 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like GHSA-3rrr-jr9j-h3q3 can be triaged on real exposure rather than presence alone.
Tailored to GHSA-3rrr-jr9j-h3q3. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is GHSA-3rrr-jr9j-h3q3 in your dependencies?
O3 Security finds GHSA-3rrr-jr9j-h3q3 across npm dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.