Advisory

GHSA-9prh-257w-9277

Also known as: CVE-2015-8861

Summary

Cross-Site Scripting in handlebars

Details

Versions of handlebars prior to 4.0.0 are affected by a cross-site scripting vulnerability when attributes in handlebar templates are not quoted.

Proof of Concept
Template:


Input:
```{ 'foo' : 'test.com onload=alert(1)'}```

Rendered result:
```<a href=test.com onload=alert(1)/>```


## Recommendation

Update to version 4.0.0 or later.
Alternatively, ensure that all attributes in handlebars templates are encapsulated with quotes.

Severity

Medium Basis: The source's own band: MODERATE

Dates

Published
2018-10-23 17:20 UTC
Modified
2026-09-10 03:47 UTC

Affected packages and fixes

handlebars

npm · All systems

Affected

  • introduced 0, fixed 4.0.0 (semver)

Fixed versions

4.0.0

Fix

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences