Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
📦
📦 npm
Not in CISA KEV
HIGH severity

CVE-2021-32820 — express-handlebars

HIGHFix: express-handlebars/express-handlebars@78c47a2

CVE-2021-32820 is a high-severity (CVSS 8.6) Information Exposure vulnerability in express-handlebars. 2 public exploit references exist, so weaponization risk is real. A fix is available for express-handlebars — see the affected versions and patch details below.

Insecure template handling in Express-handlebars

Also known asBIT-handlebars-2021-32820GHSA-fr76-2wp8-fp92
Published
Updated
Affected
1 pkg
Patched
1 / 1
Exploits
2 known
Exploitation data as of Oct 11, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

EPSS Exploitation Probability

via FIRST.org ↗
15.7%probability of exploitation in next 30 days
Moderate Risk0.00%
Lower risk than most CVEs97th percentile — riskier than 97% of all scored CVEsHighest risk
0.00%33.3%66.7%100.0%86.1%15.7%Apr 26Aug 26Oct 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

CVE-2021-32820 by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.

Where this sits among everything scored

Of 385,738 CVEs with a current EPSS score, this one falls in the 10–50% band (highlighted). Counts from FIRST.org, log-scaled.

Real-World Exposure

1 pkg affected
📦express-handlebars

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects npm packages — download data is not available via public APIs for these ecosystems.

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.

A fix is discussed in https://github.com/express-handlebars/express-handlebars/pull/163

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
📦npmexpress-handlebarsall versions5.3.1npm install express-handlebars@5.3.1

Affected Products

1 product · 1 configurations
Application
express handlebarsexpress_handlebars_project
≤ 5.3.2
range
Exploits & PoCs
2

Research use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for express-handlebars, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update express-handlebars to 5.3.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2021-32820 is resolved across your whole dependency graph.

  3. Workarounds

    Stop passing untrusted input into the interpreter or shell: call the affected binary with an argument array rather than a composed command string, reject anything outside a strict allowlist of expected values, and run the component under an account that cannot reach beyond the work it legitimately does.

How to detect CVE-2021-32820

A community-maintained Nuclei template exists for this CVE. You can scan for it directly:

nuclei -id cve-2021-32820 -u https://target
Template
Express-handlebars - Local File Inclusion
Severity
high
Impact
An attacker can exploit this vulnerability to read arbitrary files on the server, potentially leading to unauthorized access or sensitive information disclosure.
Remediation
Update to the latest version of Express-handlebars to mitigate the vulnerability.

Template by ProjectDiscovery nuclei-templates (dhiyaneshDk), MIT licensed. View the full template. Scan only systems you are authorised to test.

Frequently Asked Questions

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 hel
O3 Security · Impact-Aware SCA

Is CVE-2021-32820 in your dependencies?

Find it across npm, including transitive dependencies.

CVE-2021-32820: express Info Disclosure — Fixed in 5.3.1