A critical flaw, CVE-2021-3629, has been discovered in Undertow, a popular web server used as a default server for the WildFly Application Server, which may leave applications vulnerable to denial-of-service (DoS) attacks. This flaw arises from mishandling flow control in the HTTP/2 protocol, and the most significant threat it poses is to system availability. Affected Undertow versions include those before 2..40.Final and 2.2.11.Final.

Description of the Flaw

CVE-2021-3629 stems from a defect in Undertow’s management of flow control when processing browser requests over HTTP/2. By abusing the flow control mechanisms, a determined attacker could potentially overload the server with requests, causing performance degradation or a complete DoS.

Code Snippet

The following snippet from Undertow’s Http2Channel class demonstrates how flow control updates are handled:

private void handleFlowControl(final Http2StreamChannel channel, final int delta) {
    connection.updateSendWindowSize(channel, delta);
    if (needsFlush()) {
        flush();
    }
}

In the code snippet above, the bug lies in the handleFlowControl method that updates the flow control window size. A misconfiguration in this method's logic or a deliberate exploit could result in server overhead or even a DoS attack.

Original References

1. CVE-2021-3629 - Red Hat
2. Undertow Github Repository

Exploit Details

Currently, there are no known public exploits for CVE-2021-3629. However, considering its potential impact, it is crucial to handle any vulnerability promptly to prevent misuse.

Mitigation

To protect your applications from CVE-2021-3629, you should update Undertow to version 2..40.Final or 2.2.11.Final, as these versions include the necessary security fixes. Alternatively, if you have a custom deployment, you can apply the patches provided in the Undertow GitHub repository (link mentioned above) to patch the vulnerability.

Final Thoughts

It's essential to ensure your Undertow deployment is up-to-date, and you've applied the necessary security patches to protect against this and other vulnerabilities. Maintaining system and software security is an ongoing effort to prevent potential exploitation by attackers. Keep an eye on new security disclosures, update your software regularly, and always exercise caution against possible security threats.

Timeline

Published on: 05/24/2022 19:15:00 UTC
Last modified on: 07/29/2022 20:15:00 UTC