{"answers":{"affected":"3 open source packages ship an affected version, including express-handlebars and handlebars. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2021-32820 exists.","fix":"Upgrade express-handlebars to 5.3.1 or later.","what":"CVE-2021-32820 is a high-severity path traversal vulnerability in express-handlebars, published on 14 May 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-32820 and fix it if it is affected.\n\nWhat it is: CVE-2021-32820 is a high-severity path traversal vulnerability in express-handlebars, published on 14 May 2021. 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-2021-32820 exists.\n\nAffected packages and fixed versions:\n- express-handlebars (npm): affected all versions; fixed in 5.3.1\n- express-handlebars (npm): affected all versions; fixed in 5.3.1\n- handlebars (Bitnami): affected all versions; fixed in 5.3.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-32820/ (Markdown: https://insights.sbomify.com/CVE-2021-32820/index.md)","id":"CVE-2021-32820","markdown":"https://insights.sbomify.com/CVE-2021-32820/index.md","name":"CVE-2021-32820","record":{"aliases":["BIT-handlebars-2021-32820","GHSA-fr76-2wp8-fp92"],"analysis":{"component_type":"library","fix_type":"patch","impacts":["data_read"],"network_reachable":"yes","non_default_config":false,"product_category":"Node.js view engine","requires_auth":"none","summary":"Attackers can read arbitrary files with extensions via the layout parameter in Express Handlebars, leading to information disclosure.","user_interaction":"not_required","vuln_class":"path_traversal"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"express_handlebars","vendor":"express_handlebars_project"}],"cvss":{"score":8.6,"severity":"high","source":"nvd","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N","version":"3.1"},"cwes":[{"id":"CWE-94","name":"Improper Control of Generation of Code"},{"id":"CWE-200","name":"Exposure of Sensitive Information to an Unauthorized Actor"}],"description":"Express-handlebars is a Handlebars view engine for Express. Express-handlebars mixes pure template data with engine configuration options through the Express render API. More specifically, the layout parameter may trigger file disclosure vulnerabilities in downstream applications. This potential vulnerability is somewhat restricted in that only files with existing extentions (i.e. file.extension) can be included, files that lack an extension will have .handlebars appended to them. For complete details refer to the referenced GHSL-2021-018 report. Notes in documentation have been added to help users avoid this potential information exposure vulnerability.","ecosystems":["Bitnami","npm"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":1,"refs":[{"date":null,"kind":"nuclei","ref":"http/cves/2021/CVE-2021-32820.yaml","stars":null,"title":"Express-handlebars - Local File Inclusion"}],"tier":"weaponised"},"has_fix":true,"headline":"File disclosure in Express Handlebars","id":"CVE-2021-32820","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Bitnami","product":null,"products":[],"type":"path_traversal","year":"2021"},"n_packages":3,"n_references":5,"next":{"headline":"Regular expression Denial of Service in MooTools","id":"CVE-2021-32821"},"packages":[{"ecosystem":"Bitnami","fixed":["5.3.3"],"introduced":["0"],"last_affected":[],"package":"handlebars","purl":"pkg:bitnami/handlebars","source":"BIT-handlebars-2021-32820"},{"ecosystem":"npm","fixed":["5.3.1"],"introduced":["0"],"last_affected":[],"package":"express-handlebars","purl":null,"source":"GHSA-fr76-2wp8-fp92"},{"ecosystem":"npm","fixed":["5.3.1"],"introduced":["0"],"last_affected":[],"package":"express-handlebars","purl":"pkg:npm/express-handlebars","source":"GHSA-fr76-2wp8-fp92"}],"prev":{"headline":"Remote code execution in squirrelly","id":"CVE-2021-32819"},"products":["express-handlebars"],"published":"2021-05-14","related":[{"cvss_score":5.4,"headline":"File disclosure in express-hbs","id":"CVE-2021-32817","kev_date_added":null,"published":"2021-05-14"}],"sources":[{"class":"attribution","licence":"Apache-2.0","name":"Bitnami","prefix":"BIT"},{"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)"},{"class":"attribution","licence":"MIT","name":"Nuclei templates"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2024-08-03","vendors":["express-handlebars"]},"summary":"Attackers can read arbitrary files with extensions via the layout parameter in Express Handlebars, leading to information disclosure.","url":"https://insights.sbomify.com/CVE-2021-32820/"}