CVE-2025-54571 ModSecurity's Insufficient Return Value Handling can Lead to XSS and Source Code Disclosure
Attackers can override HTTP Content-Type headers in ModSecurity, leading to Cross-Site Scripting and source code disclosure.
- 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-54571?
CVE-2025-54571 is a medium-severity cross-site scripting vulnerability in owasp-modsecurity ModSecurity, published on 5 Aug 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
ModSecurity is an open source, cross platform web application firewall (WAF) engine for Apache, IIS and Nginx. In versions 2.9.11 and below, an attacker can override the HTTP response’s Content-Type, which could lead to several issues depending on the HTTP scenario. For example, we have demonstrated the potential for XSS and arbitrary script source code disclosure in the latest version of mod_security2. This issue is fixed in version 2.9.12.
Which versions are affected by CVE-2025-54571?
2 open source packages ship an affected version, including modsecurity and modsecurity2. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
modsecurity Bitnami | All versions | 2.9.12 |
modsecurity2 Bitnami | All versions | 2.9.12 |
Linux distribution packages (5)
apache2-mod_security2 SUSE:Linux Enterprise Module for Server Applications 15 SP6 | All versions | 2.9.4-150400.3.12.1 |
apache2-mod_security2 SUSE:Linux Enterprise Module for Server Applications 15 SP7 | All versions | 2.9.4-150400.3.12.1 |
apache2-mod_security2 SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5 | All versions | 2.8.0-7.12.1 |
apache2-mod_security2 openSUSE:Leap 15.6 | All versions | 2.9.4-150400.3.12.1 |
apache2-mod_security2 openSUSE:Tumbleweed | All versions | 2.9.12-1.1 |
Products include Owasp Modsecurity.
How do I fix CVE-2025-54571?
Upgrade modsecurity to 2.9.12 or later.
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-54571 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-54571 exists.
Other vulnerabilities in owasp-modsecurity ModSecurity
- CVE-2026-52747 Security feature bypass in ModSecurity
- CVE-2024-1019 WAF bypass of the ModSecurity v3 release line
- CVE-2026-42268 ModSecurity: Unsigned integer underflow in @verifySSN / @verifyCPF / @verifySVNR operators
- CVE-2026-30923 libModSecurity3 denial of service via segfault when using t:hexDecode on single-character query strings
- CVE-2025-48866 ModSecurity has possible DoS vulnerability in sanitiseArg action
Sources
Also known as AZL-66087, AZL-66111, BIT-modsecurity-2025-54571, BIT-modsecurity2-2025-54571, DEBIAN-CVE-2025-54571, DLA-4294-1 and 11 more.