{"answers":{"affected":"8 open source packages ship an affected version, including org.webjars.bowergithub.wycats:handlebars.js, org.webjars.npm:handlebars and org.webjars:handlebars. It affects 1 product.","exploited":"There is no known exploitation of CVE-2021-23369 in the wild and no public exploit code.","fix":"Upgrade org.webjars.bowergithub.wycats:handlebars.js to 4.7.7 or later.","what":"CVE-2021-23369 is a medium-severity code injection vulnerability in handlebars, published on 12 Apr 2021. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2021-23369 and fix it if it is affected.\n\nWhat it is: CVE-2021-23369 is a medium-severity code injection vulnerability in handlebars, published on 12 Apr 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2021-23369 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- org.webjars.bowergithub.wycats:handlebars.js (Maven): affected all versions; fixed in 4.7.7\n- org.webjars.bowergithub.wycats:handlebars.js (Maven): affected all versions; fixed in 4.7.7\n- org.webjars.npm:handlebars (Maven): affected all versions; fixed in 4.7.7\n- org.webjars.npm:handlebars (Maven): affected all versions; fixed in 4.7.7\n- org.webjars:handlebars (Maven): affected all versions; fixed in 4.7.7\n- org.webjars:handlebars (Maven): affected all versions; fixed in 4.7.7\n- handlebars (npm): affected all versions; fixed in 4.7.7\n- handlebars (npm): affected all versions; fixed in 4.7.7\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-23369/ (Markdown: https://insights.sbomify.com/CVE-2021-23369/index.md)","id":"CVE-2021-23369","markdown":"https://insights.sbomify.com/CVE-2021-23369/index.md","name":"CVE-2021-23369","record":{"aliases":["DEBIAN-CVE-2021-23369","GHSA-f2jv-r9rf-7988","MINI-hp6p-282m-33gc","MINI-vqjr-65xx-8hj6","ROOT-APP-NPM-CVE-2021-23369","UBUNTU-CVE-2021-23369"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":true,"product_category":"JavaScript templating library","requires_auth":"none","summary":"Attackers can execute arbitrary code by compiling untrusted templates with specific options in the Handlebars library.","user_interaction":"not_required","vuln_class":"code_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"snyk","cpe":[{"product":"handlebars","vendor":"handlebarsjs"}],"cvss":{"score":5.6,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L/E:P/RL:O/RC:C","version":"3.1"},"cwes":[],"description":"The package handlebars before 4.7.7 are vulnerable to Remote Code Execution (RCE) when selecting certain compiling options to compile templates coming from an untrusted source.","ecosystems":["Maven","npm"],"exploits":{"exploitdb":0,"first_seen":"2024-10-19","github_poc":2,"max_poc_stars":2,"metasploit":0,"nuclei":0,"refs":[{"date":"2024-10-19T11:27:31Z","kind":"github_poc","ref":"https://github.com/fazilbaig1/CVE-2021-23369","stars":2,"title":"Handlebars CVE-2021-23369 Vulnerability"},{"date":"2026-03-28T13:24:08Z","kind":"github_poc","ref":"https://github.com/dinhvaren/cve-2021-23369","stars":0,"title":null}],"tier":"poc_unverified"},"has_fix":true,"headline":"Remote Code Execution (RCE)","id":"CVE-2021-23369","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Maven","product":null,"products":[],"type":"code_injection","year":"2021"},"n_packages":8,"n_references":7,"next":{"headline":"Prototype Pollution","id":"CVE-2021-23370"},"packages":[{"ecosystem":"Maven","fixed":["4.7.7"],"introduced":["0"],"last_affected":[],"package":"org.webjars.bowergithub.wycats:handlebars.js","purl":null,"source":"GHSA-f2jv-r9rf-7988"},{"ecosystem":"Maven","fixed":["4.7.7"],"introduced":["0"],"last_affected":[],"package":"org.webjars.bowergithub.wycats:handlebars.js","purl":"pkg:maven/org.webjars.bowergithub.wycats/handlebars.js","source":"GHSA-f2jv-r9rf-7988"},{"ecosystem":"Maven","fixed":["4.7.7"],"introduced":["0"],"last_affected":[],"package":"org.webjars.npm:handlebars","purl":null,"source":"GHSA-f2jv-r9rf-7988"},{"ecosystem":"Maven","fixed":["4.7.7"],"introduced":["0"],"last_affected":[],"package":"org.webjars.npm:handlebars","purl":"pkg:maven/org.webjars.npm/handlebars","source":"GHSA-f2jv-r9rf-7988"},{"ecosystem":"Maven","fixed":["4.7.7"],"introduced":["0"],"last_affected":[],"package":"org.webjars:handlebars","purl":null,"source":"GHSA-f2jv-r9rf-7988"},{"ecosystem":"Maven","fixed":["4.7.7"],"introduced":["0"],"last_affected":[],"package":"org.webjars:handlebars","purl":"pkg:maven/org.webjars/handlebars","source":"GHSA-f2jv-r9rf-7988"},{"ecosystem":"npm","fixed":["4.7.7"],"introduced":["0"],"last_affected":[],"package":"handlebars","purl":null,"source":"GHSA-f2jv-r9rf-7988"},{"ecosystem":"npm","fixed":["4.7.7"],"introduced":["0"],"last_affected":[],"package":"handlebars","purl":"pkg:npm/handlebars","source":"GHSA-f2jv-r9rf-7988"}],"prev":{"headline":"Regular Expression Denial of Service (ReDoS)","id":"CVE-2021-23368"},"products":["handlebars"],"published":"2021-04-12","related":[{"cvss_score":9.8,"headline":"Handlebars.js has JavaScript Injection via AST Type Confusion","id":"CVE-2026-33937","kev_date_added":null,"published":"2026-03-27"},{"cvss_score":8.3,"headline":"Handlebars.js has JavaScript Injection in CLI Precompiler via Unescaped Names and Options","id":"CVE-2026-33941","kev_date_added":null,"published":"2026-03-27"},{"cvss_score":8.1,"headline":"Handlebars.js has JavaScript Injection via AST Type Confusion by tampering @partial-block","id":"CVE-2026-33938","kev_date_added":null,"published":"2026-03-27"},{"cvss_score":8.1,"headline":"Handlebars.js has JavaScript Injection via AST Type Confusion when passing an object as dynamic partial","id":"CVE-2026-33940","kev_date_added":null,"published":"2026-03-27"},{"cvss_score":8.1,"headline":"Arbitrary Code Execution in Handlebars","id":"CVE-2019-20920","kev_date_added":null,"published":"2020-09-30"},{"cvss_score":7.5,"headline":"Handlebars.js has Denial of Service via Malformed Decorator Syntax in Template Compilation","id":"CVE-2026-33939","kev_date_added":null,"published":"2026-03-27"},{"cvss_score":7.5,"headline":"Regular Expression Denial of Service in Handlebars","id":"CVE-2019-20922","kev_date_added":null,"published":"2020-09-30"}],"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":"FIRST CVSS licence","name":"CVSS (FIRST)"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":"yes","exploitation":"none","technical_impact":"total"},"state":"PUBLISHED","updated":"2026-10-08","vendors":["n/a"]},"summary":"Attackers can execute arbitrary code by compiling untrusted templates with specific options in the Handlebars library.","url":"https://insights.sbomify.com/CVE-2021-23369/"}