Severity: high

Cross-Site Scripting



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' : ' onload=alert(1)'}

Rendered result: <a onload=alert(1)/>


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

Have content suggestions? Send them to [email protected]

Advisory timeline

  1. published

    Advisory published
    Dec 14th, 2015
  2. reported

    Initial report by Matias P. Brutti
    Dec 14th, 2015