Skip to content
Disclosed report CVE-2016-1954

CSP's report-uri (over-)writes files

Nicolas Golubovic Follow

Originally disclosed on Mozilla

  • Fixed in 30 days
  • Paid in 27 days
  • Disclosed after 30 days
Text
Firefox can be forced to (over-)write files on the user's host when prompted to report policy violations to a file:///, resource:// or chrome:// URL. While the last two are tricky to exploit since they most likely require vulnerable add-ons, the first is dead simple. The attacker does not have full control of the report, but can control multiple values inside of the report JSON structure.

For a demonstration of the issue you may visit the following link with a UNIX host and check your /tmp directory afterwards. It should contain a file called attack_works.html.

https://c.iceqll.eu/overwrite_resource.php

The attack sends the following CSP header and then violates it:
Content-Security-Policy: script-src 'none'; report-uri file:///tmp/attack_works.html

Works in:
- FF 42, 43, 44

The first tested version where it _does not work anymore_ is the Nightly Build (47.xx).

Why do I report the issue anyway? Two reasons:
- Maybe it was fixed by accident and the severity went unnoticed
- I am in the course of writing a thesis, so I'd love to have something to reference - and if this is a duplicate, I'd like to reference that. Sorry. I'm being very selfish :-/

The original report as published on Mozilla's Bugzilla, by Nicolas Golubovic. 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 high-severity security bug in DOM: Security. Mozilla made it public on 25 February 2016 as CVE-2016-1954.

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