Apache HTTP Server 2.4.47 Vulnerability: NULL Pointer Dereference in HTTP/2 Protocol Handler
Summary
ALPINE-CVE-2021-31618: Apache HTTP Server protocol handler for the HTTP/2 protocol checks received request headers against the size limitations as configured for the server and used for the HTTP/1 protocol as well. Affects apache2 versions < 2.4.48-r0. Fixed in 2.4.48-r0. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
Apache HTTP Server is a widely used open-source web server software that enables users to serve web content. It supports various protocols, including HTTP/2, which enhances performance and efficiency for web applications. However, a vulnerability has been identified in the HTTP/2 protocol handler that can lead to server crashes, affecting availability and reliability.
Vulnerability Detail
The vulnerability arises from the Apache HTTP Server's protocol handler for HTTP/2, which fails to properly check the size of received request headers against configured limitations. When an offending header is the first one received or appears in a footer, it leads to a NULL pointer dereference, causing the child process to crash. This can be exploited easily, resulting in a Denial of Service (DoS) attack against the server. The issue specifically affects mod_http2 version 1.15.17 and Apache HTTP Server version 2.4.47, which was never officially released.
How To Fix
Minimum fixed version
2.4.48-r0
This is the first release that contains the fix.
sudo apk add --upgrade apache2
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a temporary workaround, you can disable HTTP/2 support in your Apache configuration by removing or commenting out the 'Protocols h2 http/1.1' line in your Apache configuration file. Restart the server after making this change.
Conclusion
The identified vulnerability in the Apache HTTP Server's HTTP/2 protocol handler poses a significant risk, leading to potential Denial of Service attacks. It is crucial for users to update their server to the patched version to mitigate this risk and ensure the stability of their web services.
See every vulnerability recorded for apache2 →
FAQ
The CVSS score of this vulnerability is 7.5, indicating a high severity level.
The vulnerability affects Apache HTTP Server version 2.4.47 and mod_http2 version 1.15.17.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. You can check your application using the Vulert playground at Vulert Scanner without any signup.
Exploitation of this vulnerability can lead to a Denial of Service (DoS), causing the server to crash and become unavailable to users.
Yes, a patch is available in version 2.4.48-r0 of the Apache HTTP Server. It is recommended to update to this version or later.
References
Related vulnerabilities
Recent vulnerabilities recorded for apache2.