Leaking status code of a cross-origin resource by using an audio/video tag and MediaError's messages
A cross-origin resource loaded in an audio or video element could leak its HTTP status code through the MediaError message. An attacker could use this to infer the state of endpoints and leak information in XS-Search attacks.
Originally disclosed on Mozilla
- Fixed in 12 months
- Paid in 5 months
- Disclosed after 12 months
Description
By inserting a cross-origin resource into an audio/video tag it is possible to leak its status code by getting the MediaError's message.
This vulnerability is particularly useful for XS-Search attacks, whereby knowing the status code of a cross-origin resource an attacker can infer the state of certain endpoints and then leak information (more on https://github.com/xsleaks/xsleaks/wiki/Real-World-Examples).
Reproduced on Windows 10 using version 68.0.2 (64-bit).
Steps to reproduce
- Access https://lbherrera.github.io/lab/firefox-7a135d30/index.html
- Open the DevTools and check the MediaError messages on the console.
Actual results
The real status code of the cross-origin resources was leaked.
Expected results
The real status code of the cross-origin resources shouldn't have been leaked.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the browser included the HTTP status code in the MediaError message for cross-origin media resources, exposing information that should have been hidden.
Impact
An attacker could infer the status code of cross-origin resources, enabling XS-Search attacks to leak information about endpoint states.
What the attacker needed
Victim uses a vulnerable browser; attacker can load cross-origin media
How it was found
- Access the provided lab page.
- Open the browser developer tools and check the MediaError messages in the console.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
When a web page loads a file from another site, the browser normally hides details like whether the file exists or what error occurred. Here, the browser's media player revealed the exact HTTP status code in its error message. An attacker could use that clue to learn things about pages on other sites that they should not be able to see.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.