CVE-2025-54571
ModSecurity vulnerability analysis and mitigation

Overview

ModSecurity, an open source cross-platform web application firewall (WAF) engine for Apache, IIS and Nginx, contains a vulnerability in versions 2.9.11 and below identified as CVE-2025-54571. The vulnerability was discovered in August 2025 and allows attackers to override the HTTP response's Content-Type, which could lead to several security issues including XSS and arbitrary script source code disclosure (GitHub Advisory).

Technical details

The vulnerability stems from insufficient return value handling in ModSecurity's code. In the aphookfixup phase (hookrequestlate in modsecurity2.c), ModSecurity ignores the APFILTERERROR result, allowing the request to continue and causing two HTTP responses. When Apache HTTP Server triggers APFILTER_ERROR, it places the error message in the brigade and sets the Content-Type to text/html. The issue has been assigned a CVSS v4.0 base score of 6.9 (Medium) with vector string CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N (GitHub Advisory, NVD).

Impact

The vulnerability allows attackers to override HTTP response's Content-Type, which can lead to Cross-Site Scripting (XSS) attacks and arbitrary script source code disclosure. For example, when an excessively large POST request is sent to an image file, it triggers the bug, causing the image to be processed as text/html, leading to XSS (GitHub Advisory).

Mitigation and workarounds

The vulnerability has been fixed in ModSecurity version 2.9.12. No known workarounds are available for users who cannot immediately upgrade. Organizations using affected versions of ModSecurity should upgrade to version 2.9.12 as soon as possible (GitHub Advisory).

Additional resources


SourceThis report was generated using AI

Related ModSecurity vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-27110HIGH7.9
  • ModSecurityModSecurity
  • cpe:2.3:a:trustwave:modsecurity
NoYesFeb 25, 2025
CVE-2025-48866HIGH7.5
  • Rocky LinuxRocky Linux
  • mod_security
NoYesJun 02, 2025
CVE-2025-47947HIGH7.5
  • Rocky LinuxRocky Linux
  • mod_security
NoYesMay 21, 2025
CVE-2025-54571MEDIUM6.9
  • ModSecurityModSecurity
  • apache2-mod_security2
NoYesAug 06, 2025
CVE-2025-52891MEDIUM6.5
  • ModSecurityModSecurity
  • cpe:2.3:a:trustwave:modsecurity
NoYesJul 02, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management