cvedb.io
CVE-2022-31108
MEDIUM · CVSS 4.1
EPSS exploitation probability: 0%
Published 2022-06-28T19:15:09.423 · Last modified 2026-06-17T04:44:48.970

Summary

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 sel

Affected products

mermaid_project — mermaid

Does this affect you?

Add your gear to cvedb and we'll alert you only when mermaid_project ships something exploited.

Check my exposure →

References

This product uses data from the NVD API but is not endorsed or certified by the NVD. Informational only; not professional security advice.