{"answers":{"affected":"2 open source packages ship an affected version, including shescape. It affects 1 product.","exploited":"There is no known exploitation of CVE-2021-21384 in the wild and no public exploit code.","fix":"Upgrade shescape to 1.1.3 or later.","what":"CVE-2021-21384 is a medium-severity command injection vulnerability in ericcornelissen shescape, published on 18 Mar 2021. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2021-21384 and fix it if it is affected.\n\nWhat it is: CVE-2021-21384 is a medium-severity command injection vulnerability in ericcornelissen shescape, published on 18 Mar 2021. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2021-21384 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- shescape (npm): affected all versions; fixed in 1.1.3\n- shescape (npm): affected all versions; fixed in 1.1.3\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-21384/ (Markdown: https://insights.sbomify.com/CVE-2021-21384/index.md)","id":"CVE-2021-21384","markdown":"https://insights.sbomify.com/CVE-2021-21384/index.md","name":"CVE-2021-21384","record":{"aliases":["GHSA-f2rp-38vg-j3gh"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"JavaScript shell escape library","requires_auth":"none","summary":"Attackers can execute arbitrary shell commands by injecting null characters into payloads processed by the shescape library.","user_interaction":"required","vuln_class":"command_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"shescape","vendor":"shescape_project"}],"cvss":{"score":6.3,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:C/C:L/I:H/A:N","version":"3.1"},"cwes":[{"id":"CWE-88","name":"Improper Neutralization of Argument Delimiters in a Command"}],"description":"shescape is a simple shell escape package for JavaScript. In shescape before version 1.1.3, anyone using _Shescape_ to defend against shell injection may still be vulnerable against shell injection if the attacker manages to insert a into the payload. For an example see the referenced GitHub Security Advisory. The problem has been patched in version 1.1.3. No further changes are required.","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":"Null characters not escaped in shescape","id":"CVE-2021-21384","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"command_injection","year":"2021"},"n_packages":2,"n_references":4,"next":{"headline":"Disabled hostname verification and accepting self-signed certificates","id":"CVE-2021-21385"},"packages":[{"ecosystem":"npm","fixed":["1.1.3"],"introduced":["0"],"last_affected":[],"package":"shescape","purl":null,"source":"GHSA-f2rp-38vg-j3gh"},{"ecosystem":"npm","fixed":["1.1.3"],"introduced":["0"],"last_affected":[],"package":"shescape","purl":"pkg:npm/shescape","source":"GHSA-f2rp-38vg-j3gh"}],"prev":{"headline":"XSS in Wiki.js","id":"CVE-2021-21383"},"products":["shescape"],"published":"2021-03-18","related":[{"cvss_score":9.8,"headline":"Insufficient escaping of whitespace in shescape","id":"CVE-2022-31180","kev_date_added":null,"published":"2022-08-01"},{"cvss_score":8.1,"headline":"Insufficient escaping of line feeds for CMD in shescape","id":"CVE-2022-31179","kev_date_added":null,"published":"2022-08-01"},{"cvss_score":6.9,"headline":"Shescape escape() leaves bracket glob expansion active on Bash, BusyBox, and Dash","id":"CVE-2026-32094","kev_date_added":null,"published":"2026-03-11"},{"cvss_score":6.5,"headline":"Shescape on Windows escaping may be bypassed in threaded context","id":"CVE-2023-40185","kev_date_added":null,"published":"2023-08-23"},{"cvss_score":6.2,"headline":"Exposure of home directory through shescape on Unix with Bash","id":"CVE-2022-24725","kev_date_added":null,"published":"2022-03-03"},{"cvss_score":5.9,"headline":"Shescape Inefficient Regular Expression Complexity vulnerability","id":"CVE-2022-36064","kev_date_added":null,"published":"2022-09-06"}],"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-03","vendors":["ericcornelissen"]},"summary":"Attackers can execute arbitrary shell commands by injecting null characters into payloads processed by the shescape library.","url":"https://insights.sbomify.com/CVE-2021-21384/"}