{
  "cveId": "CVE-2022-31108",
  "url": "https://patchblox.com/security/cve/CVE-2022-31108",
  "summary": "CVE-2022-31108 is fixed in node-mermaid on 1 platform by DEBIAN-CVE-2022-31108 (version 9.2.2\u002B~2.0.0-1), released June 28, 2022. It is not reported as exploited. Patch Radar priority: Routine.",
  "title": "node-mermaid: Mermaid is a JavaScript based diagramming and charting tool that uses Markdown-inspired text definitions and a render...",
  "description": "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 \u0060CSS\u0060 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 \u0060CSS\u0060 selectors. The following example shows how an attacker can exfiltrate the contents of an input field by bruteforcing the \u0060value\u0060 attribute one character at a time. Whenever there is an actual match, an \u0060http\u0060 request will be made by the browser in order to \u0022load\u0022 a background image that will let an attacker know what\u0027s the value of the character. This issue may lead to \u0060Information Disclosure\u0060 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.",
  "published": "2022-06-28T19:15:09Z",
  "severity": "medium",
  "cvss": 6.1,
  "cvssVector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N",
  "epss": 0.00914,
  "epssPercentile": 0.60361,
  "priority": "Routine",
  "priorityTier": 4,
  "exploited": false,
  "vendorExploited": false,
  "disclosed": false,
  "fixes": [
    {
      "platform": "linux",
      "product": "node-mermaid",
      "release": "Debian 14",
      "fixedVersion": "9.2.2\u002B~2.0.0-1",
      "fix": "DEBIAN-CVE-2022-31108",
      "url": "https://patchblox.com/security/fix/linux/debian-cve-2022-31108",
      "released": "2022-06-28T19:15:09Z"
    }
  ],
  "noFixYet": [],
  "dataAsOf": "2026-11-08T19:12:23Z",
  "attribution": {
    "text": "Data: Patchblox Patch Radar",
    "url": "https://patchblox.com/security/patch-radar",
    "terms": "https://patchblox.com/security/patch-radar/use-the-data"
  }
}