Skip to content

GHSA-w6qf-42m7-vh68 CVE-2024-1635

Undertow Uncontrolled Resource Consumption Vulnerability

High Maven
Severity
0.0 / 10
High · CVSS 4.0
Exploit chance (EPSS)
4.57%
Chance of exploitation in the next 30 days. Higher than 91.62% of scored vulnerabilities.
Known exploited
No
Not in CISA's catalog
Weakness
CWE-400 Uncontrolled Resource Consumption
Fix
2.3.12.Final
Upgrade io.undertow:undertow-core to this version or later

Description

A vulnerability was found in Undertow. This vulnerability impacts a server that supports the wildfly-http-client protocol. Whenever a malicious user opens and closes a connection with the HTTP port of the server and then closes the connection immediately, the server will end with both memory and open file limits exhausted at some point, depending on the amount of memory available.

At HTTP upgrade to remoting, the WriteTimeoutStreamSinkConduit leaks connections if RemotingConnection is closed by Remoting ServerConnectionOpenListener. Because the remoting connection originates in Undertow as part of the HTTP upgrade, there is an external layer to the remoting connection. This connection is unaware of the outermost layer when closing the connection during the connection opening procedure. Hence, the Undertow WriteTimeoutStreamSinkConduit is not notified of the closed connection in this scenario. Because WriteTimeoutStreamSinkConduit creates a timeout task, the whole dependency tree leaks via that task, which is added to XNIO WorkerThread. So, the workerThread points to the Undertow conduit, which contains the connections and causes the leak.

Affected versions

Maven

PackageVulnerableFixed in
io.undertow:undertow-core
>= 2.3.0.Final, < 2.3.12.Final
2.3.12.Final
io.undertow:undertow-core
< 2.2.31.Final
2.2.31.Final

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.

io.undertow:undertow-core Maven → 2.3.12.Final

maven
<dependency><groupId>io.undertow</groupId><artifactId>undertow-core</artifactId><version>2.3.12.Final</version></dependency>
gradle
implementation("io.undertow:undertow-core:2.3.12.Final")

Severity breakdown

CVSS 4.0 0.0

CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N

Attack vector
Network
Attack complexity
Low
Attack requirements
None
Privileges required
None
User interaction
None
Confidentiality (vulnerable system)
None
Integrity (vulnerable system)
None
Availability (vulnerable system)
High
Confidentiality (subsequent systems)
None
Integrity (subsequent systems)
None
Availability (subsequent systems)
None

CVSS 3.1 7.5

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

Weakness

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

Timeline

  1. Published
  2. Last updated by the source
  3. Latest EPSS score
AdvisorySeverityWhy it's related
GHSA-3x3v-w654-m28m
Undertow: Denial of Service via Multipart/Form-Data Parsing on HTTP GET Requests
Medium Also affects io.undertow:undertow-core
GHSA-33hj-rcmx-86mv
Undertow Servlets Vulnerable to Remote DoS via OutOfMemoryError when Passed Large Parameter Names
High Also affects io.undertow:undertow-core
GHSA-j382-5jj3-vw4j
Undertow HTTP server core doesn't properly validate the Host header in incoming HTTP requests
Critical Also affects io.undertow:undertow-core
GHSA-6h4f-pj3g-q8fq
Undertow OutOfMemory when parsing form data encoding with application/x-www-form-urlencoded
High Also affects io.undertow:undertow-core
GHSA-95h4-w6j8-2rp8
Undertow MadeYouReset HTTP/2 DDoS Vulnerability
High Also affects io.undertow:undertow-core
GHSA-3jrv-jgp8-45v3
Undertow incorrectly parses cookies
High Also affects io.undertow:undertow-core
GHSA-97cq-f4jm-mv8h
Undertow Denial of Service vulnerability
High Also affects io.undertow:undertow-core
GHSA-9623-mqmm-5rcf
Undertow vulnerable to Race Condition
High Also affects io.undertow:undertow-core
Is this in your code?

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