Quick answers
- Is CVE-2021-23369 exploited in the wild?
- No. Junglewise Threat Intelligence has no report of CVE-2021-23369 being exploited in the wild.
- How severe is CVE-2021-23369?
- Low severity, with a CVSS score of 3.1, published 6 May 2021.
- Which products and versions are affected?
- org.webjars:handlebars (Maven) ECOSYSTEM:introduced=0,fixed=4.7.7; org.webjars.bowergithub.wycats:handlebars.js (Maven) ECOSYSTEM:introduced=0,fixed=4.7.7; org.webjars.npm:handlebars (Maven) ECOSYSTEM:introduced=0,fixed=4.7.7.
- Is there a fix for CVE-2021-23369?
- Yes. org.webjars:handlebars (Maven): upgrade to 4.7.7 or later; org.webjars.bowergithub.wycats:handlebars.js (Maven): upgrade to 4.7.7 or later; org.webjars.npm:handlebars (Maven): upgrade to 4.7.7 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is CVE-2021-23369 attacked?
- It is attacked over the network, in a software library.
- Am I affected by CVE-2021-23369?
- Check whether you run org.webjars:handlebars (Maven), org.webjars.bowergithub.wycats:handlebars.js (Maven) or org.webjars.npm:handlebars (Maven) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
How to fix
- org.webjars:handlebars (Maven): upgrade to 4.7.7 or later
# set org.webjars:handlebars to 4.7.7 in your pom.xml or build.gradle - org.webjars.bowergithub.wycats:handlebars.js (Maven): upgrade to 4.7.7 or later
# set org.webjars.bowergithub.wycats:handlebars.js to 4.7.7 in your pom.xml or build.gradle - org.webjars.npm:handlebars (Maven): upgrade to 4.7.7 or later
# set org.webjars.npm:handlebars to 4.7.7 in your pom.xml or build.gradle
Technical details
The vulnerability is a code injection flaw (CWE-94) in Handlebars' template compilation process. When specific compiling options are used to process templates from untrusted sources, the parser fails to properly sanitize prototype property access, allowing attackers to inject and execute arbitrary JavaScript code. The attack requires no authentication and no user interaction—an attacker can send a malicious template directly to a vulnerable compilation endpoint. This was fixed in version 4.7.7 by adding strict-mode prototype property access checks in the runtime.
Affected products
- Handlebars Handlebars.js before 4.7.7
Identifiers
- CVE-2021-23369
- GHSA-f2jv-r9rf-7988
Timeline
- 2021-04-12: disclosed
- 2021-04-13: patched: Patch committed to fix prototype property access checks