CVE-2022-31108: falha de média gravidade em mermaid-js mermaid
Arbitrary `CSS` injection into the generated graph affecting the container HTML in mermaid.js
Publicada em · Atualizada em
Aviso por e-mail quando ela entrar no KEV, ganhar PoC pública ou subir de nota.
13Vexday Risk Score
Sem sinal de exploração. Nenhum artefato público de exploração conhecido até agora.
ssvc Trackcvss 4.1epss 0.9%
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.
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:N/A:N
Produtos afetados
mermaid-js · mermaidCVEs relacionadas — mermaid-js mermaid
No mesmo produto, das mais perigosas para as menos.
CVE-2021-43861HIGHIncorrect sanitisation function leads to `XSS`EPSS 0.9%CVE-2025-54881MEDIUMMermaid improperly sanitizes of sequence diagram labels leading to XSSEPSS 0.8%CVE-2026-50159MEDIUMMermaid allows CSS injection applying to sibling elements of the diagramEPSS 0.6%CVE-2026-71436MEDIUMMermaid XY Charts are vulnerable to an infinite loop DoSEPSS 0.6%CVE-2026-71439MEDIUMMermaid radar diagrams are vulnerable to DoSEPSS 0.5%CVE-2026-71437MEDIUMMermaid Architecture diagrams are vulnerable to prototype pollutionEPSS 0.5%