{"answers":{"affected":"2 open source packages ship an affected version, including @zenuml/core.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-38527 exists.","fix":"Upgrade @zenuml/core to 3.23.25 or later.","what":"CVE-2024-38527 is a medium-severity cross-site scripting vulnerability in mermaid-js zenuml-core, published on 26 Jun 2024. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2024-38527 and fix it if it is affected.\n\nWhat it is: CVE-2024-38527 is a medium-severity cross-site scripting vulnerability in mermaid-js zenuml-core, published on 26 Jun 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-38527 exists.\n\nAffected packages and fixed versions:\n- @zenuml/core (npm): affected all versions; fixed in 3.23.25\n- @zenuml/core (npm): affected all versions; fixed in 3.23.25\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2024-38527/ (Markdown: https://insights.sbomify.com/CVE-2024-38527/index.md)","id":"CVE-2024-38527","markdown":"https://insights.sbomify.com/CVE-2024-38527/index.md","name":"CVE-2024-38527","record":{"aliases":["GHSA-q6xv-jm4v-349h"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"JavaScript diagramming library","requires_auth":"none","summary":"Attackers can execute arbitrary JavaScript via unsanitized markdown comments in ZenUML diagrams, affecting applications rendering user-controlled content.","user_interaction":"not_required","vuln_class":"xss"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":5.4,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:N","version":"3.1"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"description":"ZenUML is JavaScript-based diagramming tool that requires no server, using Markdown-inspired text definitions and a renderer to create and modify sequence diagrams. Markdown-based comments in the ZenUML diagram syntax are susceptible to Cross-site Scripting (XSS). The comment feature allows the user to attach small notes for reference. This feature allows the user to enter in their comment in markdown comment, allowing them to use common markdown features, such as `**` for bolded text. However, the markdown text is currently not sanitized before rendering, allowing an attacker to enter a malicious payload for the comment which leads to XSS. This puts existing applications that use ZenUML unsandboxed at risk of arbitrary JavaScript execution when rendering user-controlled diagrams. This vulnerability was patched in version 3.23.25,","ecosystems":["npm"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"Cross-site Scripting in ZenUML","id":"CVE-2024-38527","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"xss","year":"2024"},"n_packages":2,"n_references":2,"next":{"headline":"Unlimited number of NTS-KE connections can crash ntpd-rs server","id":"CVE-2024-38528"},"packages":[{"ecosystem":"npm","fixed":["3.23.25"],"introduced":["0"],"last_affected":[],"package":"@zenuml/core","purl":null,"source":"GHSA-q6xv-jm4v-349h"},{"ecosystem":"npm","fixed":["3.23.25"],"introduced":["0"],"last_affected":[],"package":"@zenuml/core","purl":"pkg:npm/%40zenuml/core","source":"GHSA-q6xv-jm4v-349h"}],"prev":{"headline":"pdoc embeds link to malicious CDN if math mode is enabled","id":"CVE-2024-38526"},"products":["zenuml-core"],"published":"2024-06-26","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2024-08-02","vendors":["mermaid-js"]},"summary":"Attackers can execute arbitrary JavaScript via unsanitized markdown comments in ZenUML diagrams, affecting applications rendering user-controlled content.","url":"https://insights.sbomify.com/CVE-2024-38527/"}