CVE-2022-2053 Undertow vulnerable to Dos via Large AJP request

High 7.5 Published Updated

An attacker can cause a denial of service by sending oversized POST requests via AJP, triggering connection closures that mark backend workers as errors.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2022-2053?

CVE-2022-2053 is a high-severity denial of service vulnerability in Undertow, published on 5 Aug 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

When a POST request comes through AJP and the request exceeds the max-post-size limit (maxEntitySize), Undertow's AjpServerRequestConduit implementation closes a connection without sending any response to the client/proxy. This behavior results in that a front-end proxy marking the backend worker (application server) as an error state and not forward requests to the worker for a while. In mod_cluster, this continues until the next STATUS request (10 seconds intervals) from the application server updates the server state. So, in the worst case, it can result in "All workers are in error state" and mod_cluster responds "503 Service Unavailable" for a while (up to 10 seconds). In mod_proxy_balancer, it does not forward requests to the worker until the "retry" timeout passes. However, luckily, mod_proxy_balancer has "forcerecovery" setting (On by default; this parameter can force the immediate recovery of all workers without considering the retry parameter of the workers if all workers of a balancer are in error state.). So, unlike mod_cluster, mod_proxy_balancer does not result in responding "503 Service Unavailable". An attacker could use this behavior to send a malicious request and trigger server errors, resulting in DoS (denial of service). This flaw was fixed in Undertow 2.2.19.Final, Undertow 2.3.0.Alpha2.

Weakness: CWE-400

Which versions are affected by CVE-2022-2053?

4 open source packages ship an affected version, including io.undertow:undertow-core. It affects 3 products.

PackageAffectedFixed in
io.undertow:undertow-core MavenAll versions2.2.19.Final
io.undertow:undertow-core MavenAll versions2.2.19.Final
io.undertow:undertow-core MavenFrom 2.3.0.Alpha12.3.0.Alpha2
io.undertow:undertow-core MavenFrom 2.3.0.Alpha12.3.0.Alpha2

Products include Redhat Integration Camel K, Redhat Jboss Fuse, Redhat Undertow.

How do I fix CVE-2022-2053?

Upgrade io.undertow:undertow-core to a fixed version for your release line: 2.2.19.Final or 2.3.0.Alpha2.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2022-2053 being exploited?

There is no known exploitation of CVE-2022-2053 in the wild and no public exploit code.

Sources

Also known as DEBIAN-CVE-2022-2053, GHSA-95rf-557x-44g5, UBUNTU-CVE-2022-2053.

Is CVE-2022-2053 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free