CVE-2025-31651: Apache Tomcat: Bypass of rules in Rewrite Valve

Published Apr 28, 2025
·
Updated

Improper Neutralization of Escape, Meta, or Control Sequences vulnerability in Apache Tomcat. For a subset of unlikely rewrite rule configurations, it was possible for a specially crafted request to bypass some rewrite rules. If those rewrite rules effectively enforced security constraints, those constraints could be bypassed.

This issue affects Apache Tomcat: from 11.0.0-M1 through 11.0.5, from 10.1.0-M1 through 10.1.39, from 9.0.0.M1 through 9.0.102.

Users are recommended to upgrade to version [FIXEDVERSION], which fixes the issue.

Other sources

Improper Neutralization of Escape, Meta, or Control Sequences vulnerability in Apache Tomcat. For a subset of unlikely rewrite rule configurations, it was possible for a specially crafted request to bypass some rewrite rules. If those rewrite rules effectively enforced security constraints, those constraints could be bypassed.

This issue affects Apache Tomcat: from 11.0.0-M1 through 11.0.5, from 10.1.0-M1 through 10.1.39, from 9.0.0.M1 through 9.0.102. The following versions were EOL at the time the CVE was created but are known to be affected: 8.5.0 though 8.5.100. Other, older, EOL versions may also be affected.

Users are recommended to upgrade to version [FIXEDVERSION], which fixes the issue.

MITRE

Improper Neutralization of Escape, Meta, or Control Sequences vulnerability in Apache Tomcat. For a subset of unlikely rewrite rule configurations, it was possible for a specially crafted request to bypass some rewrite rules. If those rewrite rules effectively enforced security constraints, those constraints could be bypassed.

This issue affects Apache Tomcat: from 11.0.0-M1 through 11.0.5, from 10.1.0-M1 through 10.1.39, from 9.0.0.M1 through 9.0.102.

Users are recommended to upgrade to version 9.0.104, 10.1.40 or 11.0.6, which fix the issue.

GitHub

Affected Software

11 affected componentsFixes available
Apache Tomcat>=11.0.0-M1<11.0.5, >=10.1.0-M1<10.1.39, >=9.0.0.M1<9.0.102
Apache Tomcat>=9.0.0<9.0.104
Apache Tomcat>=10.1.0<10.1.40
Apache Tomcat>=11.0.0<11.0.6
maven/org.apache.tomcat.embed:tomcat-embed-core>=11.0.0-M2<11.0.6
11.0.6
maven/org.apache.tomcat.embed:tomcat-embed-core>=10.1.10<10.1.40
10.1.40
maven/org.apache.tomcat.embed:tomcat-embed-core>=9.0.76<=9.0.102
9.0.104
maven/org.apache.tomcat:tomcat-catalina>=11.0.0-M2<11.0.6
11.0.6
maven/org.apache.tomcat:tomcat-catalina>=10.1.10<10.1.40
10.1.40
maven/org.apache.tomcat:tomcat-catalina>=9.0.76<=9.0.102
9.0.104
IBM API Connect V12 OnPrem<=All

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade maven/org.apache.tomcat.embed:tomcat-embed-core to a version that resolves this vulnerability.

    Fixed in 11.0.6
  2. Upgrade

    Upgrade maven/org.apache.tomcat.embed:tomcat-embed-core to a version that resolves this vulnerability.

    Fixed in 10.1.40
  3. Upgrade

    Upgrade maven/org.apache.tomcat.embed:tomcat-embed-core to a version that resolves this vulnerability.

    Fixed in 9.0.104
  4. Upgrade

    Upgrade maven/org.apache.tomcat:tomcat-catalina to a version that resolves this vulnerability.

    Fixed in 11.0.6
  5. Upgrade

    Upgrade maven/org.apache.tomcat:tomcat-catalina to a version that resolves this vulnerability.

    Fixed in 10.1.40
  6. Upgrade

    Upgrade maven/org.apache.tomcat:tomcat-catalina to a version that resolves this vulnerability.

    Fixed in 9.0.104
  7. Upgrade

    Upgrade Apache Tomcat to a version that resolves this vulnerability.

    Fixed in 9.0.104
  8. Upgrade

    Upgrade Apache Tomcat to a version that resolves this vulnerability.

    Fixed in 10.1.40
  9. Upgrade

    Upgrade Apache Tomcat to a version that resolves this vulnerability.

    Fixed in 11.0.6
  10. Compensating control

    If immediate upgrade is not possible, review whether your rewrite rules enforce security constraints, and temporarily disable or reduce exposure of the affected rewrite-rule configurations until you can upgrade to 9.0.104, 10.1.40, or 11.0.6.

Event History

Apr 28, 2025
CVE Published
via MITRE·07:17 PM
Data Sourced
via MITRE·07:17 PM
DescriptionWeakness
Data Sourced
via Red Hat·08:01 PM
DescriptionSeverityAffected Software
Data Sourced
via NVD·08:15 PM
DescriptionSeverityWeaknessAffected Software
Advisory Published
via GitHub·09:30 PM
Jul 7, 2026
Data Sourced
via IBM·12:00 AM
DescriptionAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2025-31651?

CVE-2025-31651 has been rated as a medium-severity vulnerability due to the specific conditions under which it can be exploited.

2

How do I fix CVE-2025-31651?

To fix CVE-2025-31651, upgrade to Apache Tomcat versions 11.0.6, 10.1.40, or 9.0.103 or later.

3

Who is affected by CVE-2025-31651?

CVE-2025-31651 affects Apache Tomcat versions 11.0.0-M1 to 11.0.5, 10.1.0-M1 to 10.1.39, and 9.0.0-M1 to 9.0.102.

4

What type of vulnerability is CVE-2025-31651?

CVE-2025-31651 is classified as an Improper Neutralization of Escape, Meta, or Control Sequences vulnerability.

5

What can happen if CVE-2025-31651 is exploited?

If exploited, CVE-2025-31651 can allow a specially crafted request to bypass certain security measures enforced by rewrite rules.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203