Memory Consumption Vulnerability in nginx: CVE-2018-16843
Summary
ALPINE-CVE-2018-16843: nginx before versions 1.15.6 and 1.14.1 has a vulnerability in the implementation of HTTP/2 that can allow for excessive memory consumption. Affects nginx versions < 1.14.1-r0. Fixed in 1.14.1-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
nginx is a high-performance web server and reverse proxy server known for its stability, rich feature set, and low resource consumption. It is widely used for serving static content, load balancing, and as a reverse proxy for various applications. The vulnerability in question affects nginx versions prior to 1.15.6 and 1.14.1, specifically when compiled with the ngx_http_v2_module, which is not enabled by default. This vulnerability can lead to excessive memory consumption under certain configurations.
Vulnerability Detail
The vulnerability identified as CVE-2018-16843 arises from a flaw in the HTTP/2 implementation of nginx. When the 'http2' option is enabled in the 'listen' directive of the configuration file, it can lead to excessive memory usage, potentially causing denial of service. This issue affects users who have configured nginx to use HTTP/2, particularly those who have not updated to the patched versions. The CVSS score for this vulnerability is 7.5, indicating a high severity level.
How To Fix
Minimum fixed version
1.14.1-r0
This is the first release that contains the fix.
sudo apk add --upgrade nginx
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
If you cannot update nginx immediately, consider disabling the HTTP/2 option in your configuration file. You can do this by removing or commenting out the 'http2' directive in your 'listen' configuration. For example: 'listen 443 ssl; # http2'. This will prevent the vulnerability from being exploited until you can apply the patch.
Conclusion
The CVE-2018-16843 vulnerability in nginx poses a significant risk due to its potential for excessive memory consumption. Users are advised to update to the patched versions or implement workarounds to mitigate the risk until an update can be applied. Regular monitoring for vulnerabilities using tools like Vulert can help maintain the security of your applications.
See every vulnerability recorded for nginx →
FAQ
CVE-2018-16843 is a vulnerability in nginx that can lead to excessive memory consumption when using HTTP/2.
Check your nginx version by running 'nginx -v' in your terminal. If it is below 1.15.6 or 1.14.1, it is affected.
You can disable the HTTP/2 option in your nginx configuration as a temporary workaround.
This vulnerability can lead to excessive memory usage, potentially causing your server to crash or become unresponsive.
You can use Vulert to monitor and alert for open-source vulnerabilities in your software without needing to access the code. Visit https://vulert.com for more details.
References
Related vulnerabilities
Recent vulnerabilities recorded for nginx.