{"id":"CVE-2021-43861","state":"PUBLISHED","title":"Incorrect sanitisation function leads to `XSS`","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. Prior to version 8.13.8, malicious diagrams can run javascript code at diagram readers' machines. Users should upgrade to version 8.13.8 to receive a patch. There are no known workarounds aside from upgrading.","publishedAt":"2021-12-30T13:40:11.000Z","updatedAt":"2024-08-04T04:10:17.137Z","severity":{"score":7.2,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H","source":"GitHub_M"},"assigner":"GitHub_M","products":["mermaid-js mermaid"],"affected":[{"vendor":"mermaid-js","product":"mermaid","versions":[{"version":"< 8.13.8","status":"affected"}]}],"references":["https://github.com/mermaid-js/mermaid/security/advisories/GHSA-p3rp-vmj9-gv6v","https://github.com/mermaid-js/mermaid/commit/066b7a0d0bda274d94a2f2d21e4323dab5776d83","https://github.com/mermaid-js/mermaid/releases/tag/8.13.8"],"weaknesses":["CWE-79","CWE-20"],"ingestedAt":"2026-10-29T19:49:07.642Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2021/43xxx/CVE-2021-43861.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.1","cveMetadata":{"cveId":"CVE-2021-43861","state":"PUBLISHED","datePublished":"2021-12-30T13:40:11.000Z","dateUpdated":"2024-08-04T04:10:17.137Z","assignerShortName":"GitHub_M","assignerOrgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateReserved":"2021-11-16T00:00:00.000Z"},"containers":{"cna":{"title":"Incorrect sanitisation function leads to `XSS`","descriptions":[{"lang":"en","value":"Mermaid is a Javascript based diagramming and charting tool that uses Markdown-inspired text definitions and a renderer to create and modify complex diagrams. Prior to version 8.13.8, malicious diagrams can run javascript code at diagram readers' machines. Users should upgrade to version 8.13.8 to receive a patch. There are no known workarounds aside from upgrading."}],"affected":[{"vendor":"mermaid-js","product":"mermaid","versions":[{"version":"< 8.13.8","status":"affected"}]}],"references":[{"url":"https://github.com/mermaid-js/mermaid/security/advisories/GHSA-p3rp-vmj9-gv6v","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/mermaid-js/mermaid/commit/066b7a0d0bda274d94a2f2d21e4323dab5776d83","tags":["x_refsource_MISC"]},{"url":"https://github.com/mermaid-js/mermaid/releases/tag/8.13.8","tags":["x_refsource_MISC"]}],"metrics":[{"cvssV3_1":{"attackComplexity":"LOW","attackVector":"NETWORK","availabilityImpact":"HIGH","baseScore":7.2,"baseSeverity":"HIGH","confidentialityImpact":"HIGH","integrityImpact":"HIGH","privilegesRequired":"HIGH","scope":"UNCHANGED","userInteraction":"NONE","vectorString":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H","version":"3.1"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-79","description":"CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')","lang":"en","type":"CWE"}]},{"descriptions":[{"cweId":"CWE-20","description":"CWE-20: Improper Input Validation","lang":"en","type":"CWE"}]}],"providerMetadata":{"shortName":"GitHub_M","dateUpdated":"2021-12-30T13:40:10.000Z","orgId":"a0819718-46f1-4df5-94e2-005712e83aaa"},"source":{"advisory":"GHSA-p3rp-vmj9-gv6v","discovery":"UNKNOWN"},"x_legacyV4Record":{"CVE_data_meta":{"ASSIGNER":"security-advisories@github.com","ID":"CVE-2021-43861","STATE":"PUBLIC","TITLE":"Incorrect sanitisation function leads to `XSS`"},"affects":{"vendor":{"vendor_data":[{"product":{"product_data":[{"product_name":"mermaid","version":{"version_data":[{"version_value":"< 8.13.8"}]}}]},"vendor_name":"mermaid-js"}]}},"data_format":"MITRE","data_type":"CVE","data_version":"4.0","description":{"description_data":[{"lang":"eng","value":"Mermaid is a Javascript based diagramming and charting tool that uses Markdown-inspired text definitions and a renderer to create and modify complex diagrams. Prior to version 8.13.8, malicious diagrams can run javascript code at diagram readers' machines. Users should upgrade to version 8.13.8 to receive a patch. There are no known workarounds aside from upgrading."}]},"impact":{"cvss":{"attackComplexity":"LOW","attackVector":"NETWORK","availabilityImpact":"HIGH","baseScore":7.2,"baseSeverity":"HIGH","confidentialityImpact":"HIGH","integrityImpact":"HIGH","privilegesRequired":"HIGH","scope":"UNCHANGED","userInteraction":"NONE","vectorString":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H","version":"3.1"}},"problemtype":{"problemtype_data":[{"description":[{"lang":"eng","value":"CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')"}]},{"description":[{"lang":"eng","value":"CWE-20: Improper Input Validation"}]}]},"references":{"reference_data":[{"name":"https://github.com/mermaid-js/mermaid/security/advisories/GHSA-p3rp-vmj9-gv6v","refsource":"CONFIRM","url":"https://github.com/mermaid-js/mermaid/security/advisories/GHSA-p3rp-vmj9-gv6v"},{"name":"https://github.com/mermaid-js/mermaid/commit/066b7a0d0bda274d94a2f2d21e4323dab5776d83","refsource":"MISC","url":"https://github.com/mermaid-js/mermaid/commit/066b7a0d0bda274d94a2f2d21e4323dab5776d83"},{"name":"https://github.com/mermaid-js/mermaid/releases/tag/8.13.8","refsource":"MISC","url":"https://github.com/mermaid-js/mermaid/releases/tag/8.13.8"}]},"source":{"advisory":"GHSA-p3rp-vmj9-gv6v","discovery":"UNKNOWN"}}},"adp":[{"title":"CVE Program Container","references":[{"url":"https://github.com/mermaid-js/mermaid/security/advisories/GHSA-p3rp-vmj9-gv6v","tags":["x_refsource_CONFIRM","x_transferred"]},{"url":"https://github.com/mermaid-js/mermaid/commit/066b7a0d0bda274d94a2f2d21e4323dab5776d83","tags":["x_refsource_MISC","x_transferred"]},{"url":"https://github.com/mermaid-js/mermaid/releases/tag/8.13.8","tags":["x_refsource_MISC","x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-04T04:10:17.137Z"}}]}}}