~ / search / GHSA-9prh-257w-9277

GHSA-9prh-257w-9277

Cross-Site Scripting in handlebars

Source: GitHub Advisory Database (reviewed) Moderate CVE-2015-8861

Packages

EcosystemPackageAffectedFixed in
npm handlebars < 4.0.0 4.0.0

Details

As written in the advisory (Markdown source, shown as plain text).

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: ```<a href={{foo}}/>``` 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.

References

External links from the advisory. They lead to third-party sites.