{"answers":{"affected":"2 open source packages ship an affected version, including @github/paste-markdown. It affects 1 product.","exploited":"There is no known exploitation of CVE-2021-37700 in the wild and no public exploit code.","fix":"Upgrade @github/paste-markdown to 0.3.4 or later.","what":"CVE-2021-37700 is a medium-severity cross-site scripting vulnerability in github paste-markdown, published on 12 Aug 2021. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2021-37700 and fix it if it is affected.\n\nWhat it is: CVE-2021-37700 is a medium-severity cross-site scripting vulnerability in github paste-markdown, published on 12 Aug 2021. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2021-37700 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- @github/paste-markdown (npm): affected all versions; fixed in 0.3.4\n- @github/paste-markdown (npm): affected all versions; fixed in 0.3.4\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-2021-37700/ (Markdown: https://insights.sbomify.com/CVE-2021-37700/index.md)","id":"CVE-2021-37700","markdown":"https://insights.sbomify.com/CVE-2021-37700/index.md","name":"CVE-2021-37700","record":{"aliases":["GHSA-gpfj-4j6g-c4w9"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"npm markdown library","requires_auth":"none","summary":"An attacker can execute arbitrary JavaScript in a victim's browser by tricking them into pasting malicious clipboard data into applications using this library.","user_interaction":"required","vuln_class":"xss"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"paste-markdown","vendor":"paste-markdown_project"}],"cvss":{"score":6.5,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N","version":"3.1"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"description":"@github/paste-markdown is an npm package for pasting markdown objects. A self Cross-Site Scripting vulnerability exists in the @github/paste-markdown before version 0.3.4. If the clipboard data contains the string `\u003ctable\u003e`, a **div** is dynamically created, and the clipboard content is copied into its **innerHTML** property without any sanitization, resulting in improper execution of JavaScript in the browser of the victim (the user who pasted the code). Users directed to copy text from a malicious website and paste it into pages that utilize this library are affected. This is fixed in version 0.3.4. Refer the to the referenced GitHub Advisory for more details including an example exploit.","ecosystems":["npm"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Clipboard-based DOM-XSS","id":"CVE-2021-37700","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"xss","year":"2021"},"n_packages":2,"n_references":4,"next":{"headline":"Arbitrary File Creation/Overwrite via insufficient symlink protection due to directory cache poisoning using symbolic links","id":"CVE-2021-37701"},"packages":[{"ecosystem":"npm","fixed":["0.3.4"],"introduced":["0"],"last_affected":[],"package":"@github/paste-markdown","purl":null,"source":"GHSA-gpfj-4j6g-c4w9"},{"ecosystem":"npm","fixed":["0.3.4"],"introduced":["0"],"last_affected":[],"package":"@github/paste-markdown","purl":"pkg:npm/%40github/paste-markdown","source":"GHSA-gpfj-4j6g-c4w9"}],"prev":{"headline":"Open Redirect in Next.js versions below 11.1.0","id":"CVE-2021-37699"},"products":["paste-markdown"],"published":"2021-08-12","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":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2024-08-04","vendors":["github"]},"summary":"An attacker can execute arbitrary JavaScript in a victim's browser by tricking them into pasting malicious clipboard data into applications using this library.","url":"https://insights.sbomify.com/CVE-2021-37700/"}