DEV Community

OnaEiuspkz
OnaEiuspkz

Posted on

Tomcat RewriteValve trusted decoded paths before applying security constraints

Tomcat RewriteValve trusted decoded paths before applying security constraints

Apache Tomcat's RewriteValve handled URL encoding incorrectly in some rewrite configurations, allowing a security constraint to be bypassed. CVE-2026-59083 affects Tomcat 8.5, 9, 10.1, and 11 releases before the fixed builds.

The upstream advisory rates the issue Low. The CISA advisory enrichment publishes a 9.1 CVSS v3.1 vector with network access, no privileges, no user interaction, and high confidentiality and integrity impact. Those ratings describe different scoring contexts. The practical risk depends on whether an application uses RewriteValve in a path that participates in authentication or authorization.

Affected versions and fixes

The affected ranges are Apache Tomcat 8.5.0 through 8.5.100, 9.0.0.M1 through 9.0.119, 10.1.0-M1 through 10.1.56, and 11.0.0-M1 through 11.0.23. Fixed releases are 9.0.120, 10.1.57, and 11.0.24. Tomcat before 8.0.0 is unaffected.

A server can run Tomcat without using the vulnerable rewrite configuration. That is not a reason to defer the patch. Rewrite rules often survive in old configuration repositories long after an application changes owners.

Find the actual trust decision

Inventory RewriteValve rules and map each one to the path, host, or security constraint it is meant to protect. Pay particular attention to rules that normalize paths, route by suffix, or map an encoded segment into an internal path. Compare the external request path with the path the servlet container uses for authorization.

A security constraint must decide access from a canonical path that cannot change after the decision. If an encoded representation is decoded late, a rewrite can move the request into a different mapping than the one that was checked.

Patch and test

Upgrade to the fixed release for the deployed branch. Then run authorization tests against the rewritten paths with encoded characters, mixed case, duplicate parameters, and unusual path separators. Test allow and deny cases for each role. Do not infer a bypass from a 200 response alone; verify which servlet or resource handled it.

If patching is delayed, review rewrite rules for avoidable complexity and remove unused rules. A reverse proxy or WAF can add context, but neither should be treated as proof that Tomcat's security constraints were evaluated on the same path.

Verification checklist

  • Confirm Tomcat is on a fixed branch release.
  • List every active RewriteValve condition and rule.
  • Map rewritten paths to authentication and authorization decisions.
  • Test encoded variants against denied and allowed resources.
  • Remove unused rewrite rules and preserve a configuration baseline.

References

Top comments (0)