# CVE-2018-8037: Apache Tomcat Race Condition vulnerability

> A race condition in Apache Tomcat allows attackers to view responses intended for other users due to improper async request handling.

- **Severity:** Medium 5.9 (`CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 2 Aug 2018
- **Updated:** 16 Sep 2024
- **Also known as:** GHSA-6v52-mj5r-7j2m, UBUNTU-CVE-2018-8037

## What is CVE-2018-8037?

CVE-2018-8037 is a medium-severity vulnerability in Apache Tomcat, published on 2 Aug 2018. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

If an async request was completed by the application at the same time as the container triggered the async timeout, a race condition existed that could result in a user seeing a response intended for a different user. An additional issue was present in the NIO and NIO2 connectors that did not correctly track the closure of the connection when an async request was completed by the application and timed out by the container at the same time. This could also result in a user seeing a response intended for another user. Versions Affected: Apache Tomcat 9.0.0.M9 to 9.0.9 and 8.5.5 to 8.5.31.

Weakness: CWE-362 (Concurrent Execution using Shared Resource with Improper Synchronization)

## Which versions are affected by CVE-2018-8037?

4 open source packages ship an affected version, including org.apache.tomcat.embed:tomcat-embed-core. It affects 2 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.apache.tomcat.embed:tomcat-embed-core` | Maven | From 8.5.5 | 8.5.32 |
| `org.apache.tomcat.embed:tomcat-embed-core` | Maven | From 8.5.5 | 8.5.32 |
| `org.apache.tomcat.embed:tomcat-embed-core` | Maven | From 9.0.0.M9 | 9.0.10 |
| `org.apache.tomcat.embed:tomcat-embed-core` | Maven | From 9.0.0.M9 | 9.0.10 |

Products: Apache Tomcat, Debian Debian Linux.

## How do I fix CVE-2018-8037?

Upgrade org.apache.tomcat.embed:tomcat-embed-core to a fixed version for your release line: 8.5.32 or 9.0.10.

## Is CVE-2018-8037 being exploited?

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

## Other vulnerabilities in Apache Tomcat

- [CVE-2025-24813](https://insights.sbomify.com/CVE-2025-24813/): Apache Tomcat Path Equivalence (critical 10.0, exploited in the wild)
- [CVE-2016-8735](https://insights.sbomify.com/CVE-2016-8735/): Apache Tomcat Remote Code Execution (critical 9.8, exploited in the wild)
- [CVE-2017-12617](https://insights.sbomify.com/CVE-2017-12617/): Apache Tomcat Remote Code Execution (high 8.1, exploited in the wild)
- [CVE-2017-12615](https://insights.sbomify.com/CVE-2017-12615/): Apache Tomcat on Windows Remote Code Execution (high 8.1, exploited in the wild)
- [CVE-2026-34486](https://insights.sbomify.com/CVE-2026-34486/): Apache Tomcat Missing Encryption of Sensitive Data (high 7.5, exploited in the wild)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2018-8037 and fix it if it is affected.

What it is: CVE-2018-8037 is a medium-severity vulnerability in Apache Tomcat, published on 2 Aug 2018. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2018-8037 in the wild and no public exploit code.

Affected packages and fixed versions:
- org.apache.tomcat.embed:tomcat-embed-core (Maven): affected from 8.5.5; fixed in 8.5.32
- org.apache.tomcat.embed:tomcat-embed-core (Maven): affected from 8.5.5; fixed in 8.5.32
- org.apache.tomcat.embed:tomcat-embed-core (Maven): affected from 9.0.0.M9; fixed in 9.0.10
- org.apache.tomcat.embed:tomcat-embed-core (Maven): affected from 9.0.0.M9; fixed in 9.0.10

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2018-8037/ (Markdown: https://insights.sbomify.com/CVE-2018-8037/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2018-8037
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2018-8037
- OSV: https://osv.dev/vulnerability/CVE-2018-8037

---
From sbomify Insights: https://insights.sbomify.com/CVE-2018-8037/
Summaries are generated and may contain mistakes; the official description above is the record.
