CVE-2025-5271 Devtools' preview ignored CSP headers
Devtools preview ignored CSP headers, allowing content injection attacks in Firefox and Thunderbird.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2025-5271?
CVE-2025-5271 is a medium-severity cross-site scripting vulnerability in Mozilla Firefox, published on 27 May 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
Previewing a response in Devtools ignored CSP headers, which could have allowed content injection attacks. This vulnerability was fixed in Firefox 139 and Thunderbird 139.
Weakness: CWE-116
Which versions are affected by CVE-2025-5271?
It affects 1 product.
Products include Mozilla Firefox.
How do I fix CVE-2025-5271?
Upgrade to a fixed version.
Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.
Is CVE-2025-5271 being exploited?
There is no known exploitation of CVE-2025-5271 in the wild and no public exploit code.
Other vulnerabilities in Mozilla Firefox
Sources
Also known as GHSA-jc7v-r8h6-xr5c, UBUNTU-CVE-2025-5271.