{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2026-41149",
        "assignerOrgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
        "state": "PUBLISHED",
        "assignerShortName": "GitHub_M",
        "dateReserved": "2026-04-17T12:59:15.739Z",
        "datePublished": "2026-05-22T22:34:36.944Z",
        "dateUpdated": "2026-05-23T03:22:44.013Z"
    },
    "containers": {
        "cna": {
            "title": "Mermaid: Improper sanitization of `classDef` in state diagrams leads to HTML injection",
            "problemTypes": [
                {
                    "descriptions": [
                        {
                            "cweId": "CWE-94",
                            "lang": "en",
                            "description": "CWE-94: Improper Control of Generation of Code ('Code Injection')",
                            "type": "CWE"
                        }
                    ]
                }
            ],
            "metrics": [
                {
                    "cvssV4_0": {
                        "attackVector": "NETWORK",
                        "attackComplexity": "LOW",
                        "attackRequirements": "NONE",
                        "privilegesRequired": "NONE",
                        "userInteraction": "PASSIVE",
                        "vulnConfidentialityImpact": "NONE",
                        "vulnIntegrityImpact": "LOW",
                        "vulnAvailabilityImpact": "NONE",
                        "subConfidentialityImpact": "LOW",
                        "subIntegrityImpact": "LOW",
                        "subAvailabilityImpact": "LOW",
                        "baseScore": 5.3,
                        "baseSeverity": "MEDIUM",
                        "vectorString": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:L/VA:N/SC:L/SI:L/SA:L",
                        "version": "4.0"
                    }
                }
            ],
            "references": [
                {
                    "name": "https://github.com/mermaid-js/mermaid/security/advisories/GHSA-ghcm-xqfw-q4vr",
                    "tags": [
                        "x_refsource_CONFIRM"
                    ],
                    "url": "https://github.com/mermaid-js/mermaid/security/advisories/GHSA-ghcm-xqfw-q4vr"
                },
                {
                    "name": "https://github.com/mermaid-js/mermaid/commit/37ff937f1da2e19f882fd1db01235db4d01f4056",
                    "tags": [
                        "x_refsource_MISC"
                    ],
                    "url": "https://github.com/mermaid-js/mermaid/commit/37ff937f1da2e19f882fd1db01235db4d01f4056"
                },
                {
                    "name": "https://github.com/mermaid-js/mermaid/commit/4e2d512bf5bf6f9de1a8f0a48da78dc4d09ac4f3",
                    "tags": [
                        "x_refsource_MISC"
                    ],
                    "url": "https://github.com/mermaid-js/mermaid/commit/4e2d512bf5bf6f9de1a8f0a48da78dc4d09ac4f3"
                }
            ],
            "affected": [
                {
                    "vendor": "mermaid-js",
                    "product": "mermaid",
                    "versions": [
                        {
                            "version": ">= 11.0.0-alpha.1, < 11.15.0",
                            "status": "affected"
                        },
                        {
                            "version": "< 10.9.6",
                            "status": "affected"
                        }
                    ]
                }
            ],
            "providerMetadata": {
                "orgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
                "shortName": "GitHub_M",
                "dateUpdated": "2026-05-22T22:34:37.412Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "Mermaid is a JavaScript tool that uses Markdown-inspired text to create and modify diagrams and charts. Versions 10.9.5 and earlier, as well as 11.0.0-alpha.1 through 11.14.0, are vulnerable to HTML injection under the default configuration. Specifically, the classDef directive in Mermaid state diagrams permits DOM injection that escapes the SVG context. However, <script> tags are stripped, which prevents cross-site scripting (XSS). This issue has been fixed in versions 10.9.6 and 11.15.0. If developers are unable to immediately upgrade, they can work around this issue by setting \"securityLevel\": \"sandbox\", which prevents the issue by rendering the mermaid diagram in a sandboxed <iframe>."
                }
            ],
            "source": {
                "advisory": "GHSA-ghcm-xqfw-q4vr",
                "discovery": "UNKNOWN"
            }
        },
        "adp": [
            {
                "references": [
                    {
                        "url": "https://github.com/mermaid-js/mermaid/security/advisories/GHSA-ghcm-xqfw-q4vr",
                        "tags": [
                            "exploit"
                        ]
                    }
                ],
                "metrics": [
                    {
                        "other": {
                            "type": "ssvc",
                            "content": {
                                "timestamp": "2026-05-23T03:21:57.740211Z",
                                "id": "CVE-2026-41149",
                                "options": [
                                    {
                                        "Exploitation": "poc"
                                    },
                                    {
                                        "Automatable": "no"
                                    },
                                    {
                                        "Technical Impact": "partial"
                                    }
                                ],
                                "role": "CISA Coordinator",
                                "version": "2.0.3"
                            }
                        }
                    }
                ],
                "title": "CISA ADP Vulnrichment",
                "providerMetadata": {
                    "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
                    "shortName": "CISA-ADP",
                    "dateUpdated": "2026-05-23T03:22:44.013Z"
                }
            }
        ]
    }
}