CVE-2018-8037
Race Condition vulnerability in org.apache.tomcat.embed:tomcat-embed-core
What is CVE-2018-8037 About?
This vulnerability is a race condition in Apache Tomcat where an asynchronous request completion timing can lead to a user receiving a response intended for another user, potentially exposing sensitive information. It also involves an issue in NIO/NIO2 connectors failing to track connection closures in a similar scenario, further contributing to data leakage. Exploitation appears to be moderate, relying on specific timing conditions.
Affected Software
- org.apache.tomcat.embed:tomcat-embed-core
- >9.0.0.M9, <9.0.10
- >8.5.5, <8.5.32
Technical Details
The vulnerability arises from a race condition between an application completing an asynchronous request and the container triggering an async timeout. When these events occur concurrently, the system can mishandle the response, directing it to the wrong user. Additionally, a defect in the NIO and NIO2 connectors means that connection closure is not correctly managed if an async request finishes and times out simultaneously. This combination of factors allows responses intended for one user to be inadvertently sent to another, enabling information disclosure. The root cause is the incorrect state management during simultaneous asynchronous completion and timeout events.
What is the Impact of CVE-2018-8037?
Successful exploitation may allow attackers to gain unauthorized access to sensitive information, leading to privacy breaches or competitive disadvantages.
What is the Exploitability of CVE-2018-8037?
Exploitation of this race condition vulnerability likely requires precise timing and may be considered moderately complex. There are no explicit authentication or privilege requirements mentioned, suggesting it could be exploitable by an unauthenticated remote attacker if they can trigger the specific race condition. The vulnerability is network-accessible, making it a remote exploitation vector. The primary risk factor increasing likelihood revolves around the attacker's ability to reliably induce and win the race condition between async request completion and container timeout, which could depend on server load and network latency.
What are the Known Public Exploits?
| PoC Author | Link | Commentary |
|---|---|---|
| No known exploits | ||
What are the Available Fixes for CVE-2018-8037?
About the Fix from Resolved Security
The patch introduces a generation counter to track the "generation" of asynchronous processing for a request; this counter increments every time async processing starts. This prevents timeout events from a previous async generation from being processed after a new generation has begun, thereby eliminating the possibility of response mix-ups described in CVE-2018-8037. By ensuring timeouts are matched to the correct async generation, it closes the vulnerability that could allow an attacker to cause information leakage between requests.
Available Upgrade Options
- org.apache.tomcat.embed:tomcat-embed-core
- >8.5.5, <8.5.32 → Upgrade to 8.5.32
- org.apache.tomcat.embed:tomcat-embed-core
- >9.0.0.M9, <9.0.10 → Upgrade to 9.0.10
Struggling with dependency upgrades?
See how Resolved Security's drop-in replacements make it simple.
Book a demoAdditional Resources
- https://lists.apache.org/thread.html/6af47120905aa7d8fe12f42e8ff2284fb338ba141d3b77b8c7cb61b3%40%3Cdev.tomcat.apache.org%3E
- https://access.redhat.com/errata/RHSA-2018:2867
- https://github.com/apache/tomcat/commit/ed4b9d791f9470e4c3de691dd0153a9ce431701b
- https://lists.apache.org/thread.html/e85e83e9954f169bbb77b44baae5a33d8de878df557bb32b7f793661%40%3Cdev.tomcat.apache.org%3E
- https://www.oracle.com/security-alerts/cpuapr2020.html
- https://lists.apache.org/thread.html/88855876c33f2f9c532ffb75bfee570ccf0b17ffa77493745af9a17a%40%3Cdev.tomcat.apache.org%3E
- https://lists.apache.org/thread.html/1dd0a59c1295cc08ce4c9e7edae5ad2268acc9ba55adcefa0532e5ba%40%3Cdev.tomcat.apache.org%3E
- http://www.securitytracker.com/id/1041376
- http://mail-archives.us.apache.org/mod_mbox/www-announce/201808.mbox/%3C0c616b4d-4e81-e7f8-b81d-1bb4c575aa33%40apache.org%3E
- https://lists.apache.org/thread.html/343558d982879bf88ec20dbf707f8c11255f8e219e81d45c4f8d0551%40%3Cdev.tomcat.apache.org%3E
What are Similar Vulnerabilities to CVE-2018-8037?
Similar Vulnerabilities: CVE-2019-17560 , CVE-2011-0624 , CVE-2012-4217 , CVE-2014-0096 , CVE-2021-30623
