Manipulation with Offscreen Canvas allows bypassing tainting restrictions
The report claims that an offscreen canvas can be manipulated to bypass tainting restrictions, allowing an attacker to read image data that should be blocked by the same-origin policy. The actual result is a same-origin policy bypass that permits untainting of ImageData.
Kirtikumar Anandrao Ramchandani Follow
Originally disclosed on Mozilla
- Fixed in 39 days
- Paid in 3 months
- Disclosed after 39 days
Created attachment 9396500
canvas_report.zip
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36
Steps to reproduce:
1. Download the attached ZIP
2. Extract it into a folder
3. Visit the path locally /canvas_report/main_entry/UntaintingFFDemo.htm
Actual results:
The tainting of the ImageData is possible due to Same-Origin-Policy Bypass
Expected results:
It should block from changing
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
What the attacker needed
Victim visits a malicious page; browser supports offscreen canvas
How it was found
- Download the attached ZIP file.
- Extract it into a folder.
- Visit the local path to the demo HTML file.
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 an image from another site, the browser 'taints' the canvas so scripts cannot read the image's pixels, protecting private data. This report says a special offscreen canvas can be tricked into removing that protection, letting a malicious page read pixels it should not see.
What is CORS?
A permissive cross-origin policy lets another site read responses with the user's credentials.