Skip to content
Disclosed report Intermediate CVE-2019-17020

Content-Security-Policy inline script execution is bypassed on XSL pages

Matthew Somerville Follow

Originally disclosed on Mozilla

  • Fixed in 9 days
  • Paid in 13 days
  • Disclosed after 9 days
Text
I discovered this issue while implementing an XSL stylesheet on an RSS feed.
Firefox (I am running version 70.0.1 on Windows 10) does not honour the Content-Security-Policy header on inline JavaScript given in an XSL template included by an XML file.

I have made some test cases which I hope are helpful:
* https://traintimes.org.uk/firefox-csp/ shows the main issue I found - it is an XML file sent with a CSP header saying no inline JavaScript, but includes an XSL stylesheet containing a template with inline JavaScript that does run in Firefox (both the inline script and the inline event handler);
* https://traintimes.org.uk/firefox-csp/html.php is the same HTML, as the XSL template but served as HTML, and here you can see the inline JavaScript does not run in Firefox.

In Chrome,  you get the error: "Refused to execute inline script because it violates the following Content Security Policy directive" on both HTML and XML versions.

The original report as published on Mozilla's Bugzilla, by Matthew Somerville. Images and videos are our own copies; raw HTML is shown as text. View it on Mozilla's Bugzilla.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

What is known

A medium-severity security bug in DOM: Security. Mozilla made it public on 28 November 2019 as CVE-2019-17020.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.