GHSA-475f-74wp-pqv5 CVE-2014-0075
Integer Overflow or Wraparound in Apache Tomcat
- Severity
- Medium
- The publisher's own rating, not a CVSS score
- Exploit chance (EPSS)
- 17.58%
- Chance of exploitation in the next 30 days. Higher than 97.14% of scored vulnerabilities.
- Known exploited
- No
- Not in CISA's catalog
- Fix
- Available
- 2 packages have a fixed version
Description
Integer overflow in the parseChunkHeader function in java/org/apache/coyote/http11/filters/ChunkedInputFilter.java in Apache Tomcat before 6.0.40, 7.x before 7.0.53, and 8.x before 8.0.4 allows remote attackers to cause a denial of service (resource consumption) via a malformed chunk size in chunked transfer coding of a request during the streaming of data.
Affected versions
Maven
| Package | Vulnerable | Fixed in |
|---|---|---|
| org.apache.tomcat:tomcat | < 6.0.40 |
6.0.40 |
| org.apache.tomcat:tomcat | >= 7.0.0, < 7.0.53 |
7.0.53 |
| org.apache.tomcat:tomcat | >= 8.0.0, < 8.0.4 |
8.0.4 |
| org.apache.tomcat:tomcat-coyote | < 6.0.40 |
6.0.40 |
| org.apache.tomcat:tomcat-coyote | >= 7.0.0, < 7.0.53 |
7.0.53 |
| org.apache.tomcat:tomcat-coyote | >= 8.0.0, < 8.0.4 |
8.0.4 |
How to fix
Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.
org.apache.tomcat:tomcat Maven → 6.0.40
- maven
<dependency><groupId>org.apache.tomcat</groupId><artifactId>tomcat</artifactId><version>6.0.40</version></dependency>- gradle
implementation("org.apache.tomcat:tomcat:6.0.40")
org.apache.tomcat:tomcat-coyote Maven → 6.0.40
- maven
<dependency><groupId>org.apache.tomcat</groupId><artifactId>tomcat-coyote</artifactId><version>6.0.40</version></dependency>- gradle
implementation("org.apache.tomcat:tomcat-coyote:6.0.40")
Weakness
CWE-190: Integer Overflow or Wraparound
The product performs a calculation that can produce an integer overflow or wraparound when the logic assumes that the resulting value will always be larger than the original value. This occurs when an integer value is incremented to a value that is too large to store in the associated representation. When this occurs, the value may become a very small or negative number.
How to prevent it
- Requirements: Ensure that all protocols are strictly defined, such that all out-of-bounds behavior can be identified simply, and require strict conformance to the protocol.
- Requirements: Use a language that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid. If possible, choose a language or compiler that performs automatic bounds checking.
- Architecture and Design: Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid [REF-1482]. Use libraries or frameworks that make it easier to handle numbers without unexpected consequences. Examples include safe integer handling packages such as SafeInt (C++) or IntegerLib (C or C++). [REF-106]
- Implementation: Perform input validation on any numeric input by ensuring that it is within the expected range. Enforce that the input meets both the minimum and maximum requirements for the expected range. Use unsigned integers where possible. This makes it easier to perform validation for integer overflows. When signed integers are required, ensure that the range check includes minimum values as well as maximum values.
- Implementation: Understand the programming language's underlying representation and how it interacts with numeric calculation (CWE-681). Pay close attention to byte size discrepancies, precision, signed/unsigned distinctions, truncation, conversion and casting between types, "not-a-number" calculations, and how the language handles numbers that are too large or too small for its underlying representation. [REF-7] Also be careful to account for 32-bit, 64-bit, and other potential differences that may affect the numeric representation.
- Architecture and Design: For any security checks that are performed on the client side, ensure that these checks are duplicated on the server side, in order to avoid CWE-602. Attackers can bypass the client-side checks by modifying values after the checks have been performed, or by changing the client to remove the client-side checks entirely. Then, these modified values would be submitted to the server.
- Implementation: Examine compiler warnings closely and eliminate problems with potential security implications, such as signed / unsigned mismatch in memory operations, or use of uninitialized variables. Even if the weakness is rarely exploitable, a single failure may lead to the compromise of the entire system.
CWE-400: Uncontrolled Resource Consumption
The product does not properly control the allocation and maintenance of a limited resource.
How to prevent it
- Architecture and Design: Design throttling mechanisms into the system architecture. The best protection is to limit the amount of resources that an unauthorized user can cause to be expended. A strong authentication and access control model will help prevent such attacks from occurring in the first place. The login application should be protected against DoS attacks as much as possible. Limiting the database access, perhaps by caching result sets, can help minimize the resources expended. To further limit the potential for a DoS attack, consider tracking the rate of requests received from users and blocking requests that exceed a defined rate threshold.
- Architecture and Design: Mitigation of resource exhaustion attacks requires that the target system either: recognizes the attack and denies that user further access for a given amount of time, or uniformly throttles all requests in order to make it more difficult to consume resources more quickly than they can again be freed. The first of these solutions is an issue in itself though, since it may allow attackers to prevent the use of the system by a particular valid user. If the attacker impersonates the valid user, they may be able to prevent the user from accessing the server in question. The second solution is simply difficult to effectively institute -- and even when properly done, it does not provide a full solution. It simply makes the attack require more resources on the part of the attacker.
- Architecture and Design: Ensure that protocols have specific limits of scale placed on them.
- Implementation: Ensure that all failures in resource allocation place the system into a safe posture.
References
Advisories
Packages
Other links
- github.com/apache/tomcat/commit/b6974571c122f6a1e7ec74a90fa212976fa7b0ed
- github.com/apache/tomcat/commit/f646a5acd5e32d6f5a2d9bf1d94ca66b65477675
- github.com/apache/tomcat80/commit/d49a03728ac7e3c800b1b0ce0eeccd8a5a21bb91
- lists.apache.org/thread.html/r9136ff5b13e4f1941360b5a309efee2c114a14855578c3a2cbe5d19…
- lists.apache.org/thread.html/r9136ff5b13e4f1941360b5a309efee2c114a14855578c3a2cbe5d19…
- lists.apache.org/thread.html/r587e50b86c1a96ee301f751d50294072d142fd6dc08a8987ae9f3a9…
- lists.apache.org/thread.html/r587e50b86c1a96ee301f751d50294072d142fd6dc08a8987ae9f3a9…
- lists.apache.org/thread.html/r03c597a64de790ba42c167efacfa23300c3d6c9fe589ab87fe02859…
- lists.apache.org/thread.html/r03c597a64de790ba42c167efacfa23300c3d6c9fe589ab87fe02859…
- lists.apache.org/thread.html/b8a1bf18155b552dcf9a928ba808cbadad84c236d85eab3033662cfb…
- lists.apache.org/thread.html/b8a1bf18155b552dcf9a928ba808cbadad84c236d85eab3033662cfb…
- lists.apache.org/thread.html/b84ad1258a89de5c9c853c7f2d3ad77e5b8b2930be9e132d5cef6b95…
- lists.apache.org/thread.html/b84ad1258a89de5c9c853c7f2d3ad77e5b8b2930be9e132d5cef6b95…
- lists.apache.org/thread.html/39ae1f0bd5867c15755a6f959b271ade1aea04ccdc3b2e639dcd903b…
- lists.apache.org/thread.html/39ae1f0bd5867c15755a6f959b271ade1aea04ccdc3b2e639dcd903b…
- lists.apache.org/thread.html/37220405a377c0182d2afdbc36461c4783b2930fbeae3a17f1333113…
- lists.apache.org/thread.html/37220405a377c0182d2afdbc36461c4783b2930fbeae3a17f1333113…
- h20564.www2.hpe.com/portal/site/hpsc/public/kb/docDisplay
- advisories.mageia.org/MGASA-2014-0268.html
- linux.oracle.com/errata/ELSA-2014-0865.html
- lists.fedoraproject.org/pipermail/package-announce/2015-February/150282.html
- marc.info
- marc.info
- marc.info
- rhn.redhat.com/errata/RHSA-2015-0675.html
- rhn.redhat.com/errata/RHSA-2015-0720.html
- rhn.redhat.com/errata/RHSA-2015-0765.html
- seclists.org/fulldisclosure/2014/Dec/23
- secunia.com/advisories/59121
- secunia.com/advisories/59616
- secunia.com/advisories/59678
- secunia.com/advisories/59732
- secunia.com/advisories/59835
- secunia.com/advisories/59849
- secunia.com/advisories/59873
- secunia.com/advisories/60729
- secunia.com/advisories/60793
- svn.apache.org/viewvc
- svn.apache.org/viewvc
- svn.apache.org/viewvc
- tomcat.apache.org/security-6.html
- tomcat.apache.org/security-7.html
- tomcat.apache.org/security-8.html
- www-01.ibm.com/support/docview.wss
- www-01.ibm.com/support/docview.wss
- www-01.ibm.com/support/docview.wss
- debian.org/security/2016/dsa-3447
- debian.org/security/2016/dsa-3530
- mandriva.com/security/advisories
- mandriva.com/security/advisories
- mandriva.com/security/advisories
- novell.com/support/kb/doc.php
- oracle.com/technetwork/security-advisory/cpuoct2016-2881722.html
- oracle.com/technetwork/topics/security/cpujul2014-1972956.html
- oracle.com/technetwork/topics/security/cpuoct2014-1972960.html
- securityfocus.com/archive/1/534161/100/0/threaded
- securityfocus.com/bid/67671
- vmware.com/security/advisories/VMSA-2014-0012.html
Timeline
- Published
- Last updated by the source
- Latest EPSS score
Related advisories
| Advisory | Severity | Why it's related |
|---|---|---|
| GHSA-69r9-qgr7-g2wj Apache Tomcat Missing Encryption of Sensitive Data vulnerability | High Known exploited | Also affects org.apache.tomcat:tomcat |
| GHSA-qppj-fm5r-hxr3 HTTP/2 Stream Cancellation Attack | Medium Known exploited | Also affects org.apache.tomcat:tomcat-coyote |
| GHSA-h3x4-894j-xpx5 Apache Tomcat's FORM authentication process has an Incorrect Authorization vulnerability | Critical | Also affects org.apache.tomcat:tomcat |
| GHSA-9xv2-5v5q-p794 Apache Tomcat's DIGEST authenticator has an Authentication Bypass by Capture-replay vulnerability | Critical | Also affects org.apache.tomcat:tomcat |
| GHSA-f525-44xv-f2qj Apache Tomcat - HTTP/2 no-authority bypass of strict SNI validation | Critical | Also affects org.apache.tomcat:tomcat-coyote |
| GHSA-gcx9-497g-6cp6 Apache Tomcat has an Improper Access Control, Incorrect Authorization vulnerability | Critical | Also affects org.apache.tomcat:tomcat |
| GHSA-5m62-pw8w-7w9f Apache Tomcat - Security constraints not correctly applied | Critical | Also affects org.apache.tomcat:tomcat |
| GHSA-9m89-8frq-c98c Apache Tomcat - AJP secret compared in non-constant time | Low | Also affects org.apache.tomcat:tomcat |
MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.
Check your repos with MergeHarbor