CVE-2019-20920
Arbitrary Code Execution in Handlebars
Description
Handlebars before 3.0.8 and 4.x before 4.5.3 is vulnerable to Arbitrary Code Execution. The lookup helper fails to properly validate templates, allowing attackers to submit templates that execute arbitrary JavaScript. This can be used to run arbitrary code on a server processing Handlebars templates or in a victim's browser (effectively serving as XSS).
Affected Maven artifacts (3)
| Artifact | Affected versions | Fixed in |
|---|---|---|
| org.mvnpm » handlebarsvia npm handlebars | < 3.0.8>= 4.0.0, < 4.5.3 | 3.0.8, 4.5.3 |
| org.webjars » handlebarsvia npm handlebars | < 3.0.8>= 4.0.0, < 4.5.3 | 3.0.8, 4.5.3 |
| org.webjars.npm » handlebarsvia npm handlebars | < 3.0.8>= 4.0.0, < 4.5.3 | 3.0.8, 4.5.3 |
Blast radius
60% of the dependent artifacts (69) still pull an affected version in their latest release.
| Depth | Dependent versions |
|---|---|
| Direct | 216 |
| 2 hops | 1,284 |
| 3 hops | 258 |
| 4 hops | 123 |
| 5 hops | 15 |
| 6 hops | 10 |
Most used dependents
- org.kuali.rice » rice-impl65 usages
- ro.isdc.wro4j » wro4j-maven-plugin48 usages
- ro.isdc.wro4j » wro4j-extensions39 usages
- org.kuali.rice » rice-krad-web-framework38 usages
- org.kuali.rice » rice-core-impl28 usages
- org.kuali.rice » rice-edl-impl24 usages
- com.foreach.across.modules » admin-web-module21 usages
- net.aequologica.neo » geppaequo-tags15 usages
- org.nuiton.js » nuiton-js-test12 usages
- com.evolveum.midpoint.gui » admin-gui10 usages
- com.foreach.across.modules » bootstrap-ui-module7 usages
- org.wisdom-framework » wisdom-monitor7 usages
- net.aequologica.neo » geppaequo-web7 usages
- com.github.avarabyeu.jashing » jashing7 usages
- com.xebialabs.xl-test » server7 usages
Computed from the dependency graph of build 20261124.0621 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.
Other ecosystems
Also affects npm (1 package) . See all on OSV
References
| Advisory | NVD CVE-2019-20920 | nvd.nist.gov |
| Web | handlebars-lang/handlebars.js commit 156061e | github.com |
| Web | handlebars-lang/handlebars.js commit d541378 | github.com |
| Web | vuln/SNYK-JS-HANDLEBARS-534478 | snyk.io |
| Web | advisories/1316 | npmjs.com |
| Web | advisories/1324 | npmjs.com |
| Web | package/handlebars | npmjs.com |
