CVE-2025-52520: Apache Tomcat Catalina is vulnerable to DoS attack through bypassing of size limits
7.5
Basic Information
Technical Details
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
org.apache.tomcat:tomcat-catalina | maven | >= 11.0.0-M1, < 11.0.9 | 11.0.9 |
org.apache.tomcat:tomcat-catalina | maven | >= 10.1.0-M1, < 10.1.43 | 10.1.43 |
org.apache.tomcat:tomcat-catalina | maven | >= 9.0.0.M1, < 9.0.107 | 9.0.107 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability lies in the parseParts
method within the org.apache.catalina.connector.Request
class. The core of the issue is an integer overflow vulnerability. The postSize
variable, which accumulates the size of the parts of a multipart request, was declared as an int
. For very large uploads, this variable could overflow, wrapping around to a small or negative value. This would cause the check against maxPostSize
to pass, even though the actual size of the request is much larger. This allows an attacker to bypass the intended size limits, potentially leading to a Denial of Service by exhausting server resources (disk space or memory). The provided patches clearly show the fix: changing the postSize
variable to a long
and using Math.addExact
for calculations to prevent overflow by throwing an exception if the result exceeds the capacity of a long
. All three supplied commits point to this exact same change in different branches of the Apache Tomcat codebase, confirming this is the single vulnerable function.