CVE-2017-5664: Improper Handling of Exceptional Conditions in Apache Tomcat

org.apache.tomcat:tomcat Updated 02 Oct 2025

Summary

13/05/2022
Yes i
High
7.5

CVE-2017-5664: Improper Handling of Exceptional Conditions in Apache Tomcat. Affects org.apache.tomcat:tomcat across 4 version ranges.

>= 7.0.0, < 7.0.78 >= 8.0.0, < 8.0.44 >= 8.5.0, < 8.5.15 >= 9.0.0.M1, < 9.0.0.M21

Fixed in 4 releases; the minimum fixed version depends on the release line you run. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

Apache Tomcat is an open-source web server and servlet container that is used to deploy Java applications. It provides a Java Servlet and JavaServer Pages (JSP) environment for running web applications. Apache Tomcat versions 7.0.0 to 7.0.77, 8.0.0.RC1 to 8.0.43, 8.5.0 to 8.5.14, and 9.0.0.M1 to 9.0.0.M20 are affected by a vulnerability that can lead to unexpected and undesirable results for static error pages. This vulnerability, identified as CVE-2017-5664, can potentially allow an attacker to replace or remove custom error pages if the DefaultServlet is configured to permit writes.

Vulnerability Detail

The error page mechanism of the Java Servlet Specification requires that, when an error occurs and an error page is configured for the error that occurred, the original request and response are forwarded to the error page. However, the Default Servlet in Apache Tomcat versions 7.0.0 to 7.0.77, 8.0.0.RC1 to 8.0.43, 8.5.0 to 8.5.14, and 9.0.0.M1 to 9.0.0.M20 does not handle this properly. Depending on the original request, this can lead to unexpected and undesirable results for static error pages, including the replacement or removal of the custom error page. This vulnerability has a CVSS score of 7.5, indicating a high severity.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • >= 7.0.0, < 7.0.78 7.0.78
  • >= 8.0.0, < 8.0.44 8.0.44
  • >= 8.5.0, < 8.5.15 8.5.15
  • >= 9.0.0.M1, < 9.0.0.M21 9.0.0.M21

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Workaround

If upgrading to the latest version is not immediately feasible, a possible workaround is to disable the DefaultServlet's write permissions. By preventing the DefaultServlet from writing to the custom error page, the risk of replacement or removal of the page can be mitigated. This can be achieved by modifying the configuration of the Apache Tomcat server to restrict the write permissions of the DefaultServlet.

Conclusion

In conclusion, the vulnerability CVE-2017-5664 in Apache Tomcat versions 7.0.0 to 7.0.77, 8.0.0.RC1 to 8.0.43, 8.5.0 to 8.5.14, and 9.0.0.M1 to 9.0.0.M20 can lead to unexpected and undesirable results for static error pages. It is crucial to upgrade to the latest version of Apache Tomcat to fix this vulnerability and ensure the proper handling of exceptional conditions. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for org.apache.tomcat:tomcat →

Share this vulnerability

FAQ

Apache Tomcat is an open-source web server and servlet container that provides a Java Servlet and JavaServer Pages (JSP) environment for running web applications.

Apache Tomcat versions 7.0.0 to 7.0.77, 8.0.0.RC1 to 8.0.43, 8.5.0 to 8.5.14, and 9.0.0.M1 to 9.0.0.M20 are affected by this vulnerability.

This vulnerability can lead to unexpected and undesirable results for static error pages, including the replacement or removal of custom error pages.

The CVSS score of this vulnerability is 7.5, indicating a high severity.

To mitigate the risk, it is recommended to upgrade to Apache Tomcat version 7.0.78, 8.0.44, 8.5.15, or 9.0.0.M21 or later.

Related vulnerabilities

Recent vulnerabilities recorded for org.apache.tomcat:tomcat.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • >= 7.0.0, < 7.0.78 7.0.78
  • >= 8.0.0, < 8.0.44 8.0.44
  • >= 8.5.0, < 8.5.15 8.5.15
  • >= 9.0.0.M1, < 9.0.0.M21 9.0.0.M21

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback