{"answers":{"affected":"3 open source packages ship an affected version, including express-hbs and handlebars. It affects 1 product.","exploited":"There is no known exploitation of CVE-2021-32817 in the wild and no public exploit code.","fix":"Apply the vendor's patch.","what":"CVE-2021-32817 is a medium-severity path traversal vulnerability in TryGhost express-hbs, 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-32817 and fix it if it is affected.\n\nWhat it is: CVE-2021-32817 is a medium-severity path traversal vulnerability in TryGhost express-hbs, published on 14 May 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-32817 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- express-hbs (npm): affected all versions up to 2.4.0; no fix listed\n- express-hbs (npm): affected all versions up to 2.4.0; no fix listed\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-32817/ (Markdown: https://insights.sbomify.com/CVE-2021-32817/index.md)","id":"CVE-2021-32817","markdown":"https://insights.sbomify.com/CVE-2021-32817/index.md","name":"CVE-2021-32817","record":{"aliases":["BIT-handlebars-2021-32817","GHSA-rwxp-hwwf-653v"],"analysis":{"component_type":"library","fix_type":"patch","impacts":["data_read"],"network_reachable":"yes","non_default_config":false,"product_category":"Node.js template engine","requires_auth":"none","summary":"Attackers can read arbitrary files with extensions via the layout parameter in express-hbs, 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":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-94","name":"Improper Control of Generation of Code"},{"id":"CWE-200","name":"Exposure of Sensitive Information to an Unauthorized Actor"}],"description":"express-hbs is an Express handlebars template engine. express-hbs 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 .hbs appended to them. For complete details refer to the referenced GHSL-2021-019 report. Notes in documentation have been added to help users of express-hbs 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":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"File disclosure in express-hbs","id":"CVE-2021-32817","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Bitnami","product":null,"products":[],"type":"path_traversal","year":"2021"},"n_packages":3,"n_references":4,"next":{"headline":"Remote code execution and Reflected cross site scripting in haml-coffee","id":"CVE-2021-32818"},"packages":[{"ecosystem":"Bitnami","fixed":["5.3.3"],"introduced":["0"],"last_affected":[],"package":"handlebars","purl":"pkg:bitnami/handlebars","source":"BIT-handlebars-2021-32817"},{"ecosystem":"npm","fixed":[],"introduced":["0"],"last_affected":["2.4.0"],"package":"express-hbs","purl":null,"source":"GHSA-rwxp-hwwf-653v"},{"ecosystem":"npm","fixed":[],"introduced":["0"],"last_affected":["2.4.0"],"package":"express-hbs","purl":"pkg:npm/express-hbs","source":"GHSA-rwxp-hwwf-653v"}],"prev":{"headline":"Regular expression Denial of Service in ProtonMail","id":"CVE-2021-32816"},"products":["express-hbs"],"published":"2021-05-14","related":[{"cvss_score":8.6,"headline":"File disclosure in Express Handlebars","id":"CVE-2021-32820","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)"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2024-08-03","vendors":["TryGhost"]},"summary":"Attackers can read arbitrary files with extensions via the layout parameter in express-hbs, leading to information disclosure.","url":"https://insights.sbomify.com/CVE-2021-32817/"}