CVE-2026-65927 in Tomcatinfo

Summary

by MITRE • 08/26/2026

Off-by-one Error vulnerability in Apache Tomcat impacting the [N] flag on the rewrite valves causes rewrite processing to restart at the second rule rather than the first rule.







This issue affects Apache Tomcat: from 11.0.0-M1 through 11.0.24, from 10.1.0-M1 through 10.1.57, from 9.0.0.M1 through 9.0.120.



The following versions were EOL at the time the CVE was created but are known to be affected: from 8.5.0 through 8.5.100. Other unsupported versions may also be affected.



Users are recommended to upgrade to version 11.0.25, 10.1.58 or 9.0.121 which fix the issue.

Be aware that VulDB is the high quality source for vulnerability data.

Analysis

by VulDB Data Team • 08/26/2026

The vulnerability identified in Apache Tomcat involves a critical logic error within the URL rewriting mechanism, specifically affecting the behavior of the [N] flag used in rewrite valves. This component is responsible for processing regular expression-based rules to modify or redirect incoming HTTP requests before they are handled by the application backend. The core technical flaw stems from an off-by-one error during the internal state management of the rule iteration process. When a rewrite rule containing the [N] flag is executed, it signals that subsequent rules should be re-evaluated against the modified URI. However, due to the indexing miscalculation, instead of restarting the evaluation sequence at the first rule in the chain as intended by the specification and standard logical flow, the engine incorrectly resumes processing from the second rule. This deviation breaks the expected deterministic behavior of the rewrite valve, leading to unpredictable request handling outcomes depending on the specific configuration and order of rules defined in the context or server configuration files.

The operational impact of this vulnerability is significant for applications relying on complex URL rewriting logic for security controls such as access restriction, path normalization, or canonicalization. Because the first rule is skipped during restart cycles triggered by the [N] flag, any security checks or transformations placed at the beginning of a rewrite chain may be bypassed under specific conditions. For instance, if an administrator has configured a rule to block requests containing malicious patterns in the URI and that rule appears before other transformation rules using the [N] flag for further processing, those blocking rules might not execute as expected when re-evaluation is required. This can lead to security policy evasion where unauthorized or malformed requests are allowed through because the initial filtering logic was effectively ignored during the restart phase of the rewrite process. Additionally, this behavior can cause functional regressions in applications that depend on precise URI manipulation for routing purposes, potentially resulting in 404 errors or incorrect backend target selection.

This flaw aligns with CWE-193, which describes an off-by-one error leading to a one-byte read or write beyond the expected boundary, although in this context it manifests as logical control flow deviation rather than memory corruption. From a threat modeling perspective related to MITRE ATT&CK, such vulnerabilities can be leveraged for Defense Evasion techniques where attackers manipulate request paths to bypass security filters that rely on sequential rule evaluation. The vulnerability affects multiple major branches of Apache Tomcat, including versions 11.0 through 11.0.24, 10.1 through 10.1.57, and 9.0 through 9.0.120. It also impacts legacy version 8.5 up to 8.5.100, although these versions are end-of-life and no longer receive official support or security patches from the Apache Software Foundation. The presence of this bug in long-term supported releases highlights the importance of rigorous code review for logic errors that do not necessarily cause crashes but compromise functional integrity and security posture.

To mitigate this risk, organizations running affected versions must upgrade to patched releases immediately. Specifically, users should migrate to Tomcat 11.0.25, 10.1.58, or 9.0.121, which contain the corrected logic for handling rule restarts in the rewrite valve. For environments where immediate upgrading is not feasible due to compatibility constraints with legacy applications, temporary workarounds should be implemented within the application layer rather than relying solely on server-side rewriting rules that utilize the [N] flag extensively. Reviewing and simplifying complex rewrite chains can reduce exposure by minimizing reliance on iterative rule processing. Furthermore, implementing strict input validation at the web application firewall or reverse proxy level upstream of Tomcat can provide an additional defense-in-depth layer to catch malformed requests before they reach the vulnerable rewriting engine. Regular auditing of configuration files for deprecated flags or overly complex rule sets is also recommended to maintain a robust security architecture against logic-based vulnerabilities.

Responsible

Apache

Reservation

07/23/2026

Disclosure

08/26/2026

Moderation

accepted

CPE

ready

EPSS

0.00000

KEV

no

Activities

very low

Sources

Might our Artificial Intelligence support you?

Check our Alexa App!