# CVE-2025-59822: Http4s vulnerable to HTTP Request Smuggling due to improper handling of HTTP trailer section

> Attackers can bypass security controls and poison caches via HTTP request smuggling in Http4s when deployed behind a reverse proxy.

- **Severity:** Medium 6.3 (`CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 23 Sep 2025
- **Updated:** 23 Sep 2025
- **Also known as:** GHSA-wcwh-7gfw-5wrr

## What is CVE-2025-59822?

CVE-2025-59822 is a medium-severity vulnerability in http4s, published on 23 Sep 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Http4s is a Scala interface for HTTP services. In versions from 1.0.0-M1 to before 1.0.0-M45 and before 0.23.31, http4s is vulnerable to HTTP Request Smuggling due to improper handling of HTTP trailer section. This vulnerability could enable attackers to bypass front-end servers security controls, launch targeted attacks against active users, and poison web caches. A pre-requisite for exploitation involves the web application being deployed behind a reverse-proxy that forwards trailer headers. This issue has been patched in versions 1.0.0-M45 and 0.23.31.

Weakness: CWE-444 (Inconsistent Interpretation of HTTP Requests)

## Which versions are affected by CVE-2025-59822?

10 open source packages ship an affected version, including org.http4s:http4s-ember-core_2.13, org.http4s:http4s-ember-core_2.12 and org.http4s:http4s-ember-core_3. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.http4s:http4s-ember-core_2.13` | Maven | All versions | 0.23.31 |
| `org.http4s:http4s-ember-core_2.13` | Maven | All versions | 0.23.31 |
| `org.http4s:http4s-ember-core_2.13` | Maven | From 1.0.0-M1 | 1.0.0-M45 |
| `org.http4s:http4s-ember-core_2.13` | Maven | From 1.0.0-M1 | 1.0.0-M45 |
| `org.http4s:http4s-ember-core_2.12` | Maven | All versions | 0.23.31 |
| `org.http4s:http4s-ember-core_2.12` | Maven | All versions | 0.23.31 |
| `org.http4s:http4s-ember-core_3` | Maven | All versions | 0.23.31 |
| `org.http4s:http4s-ember-core_3` | Maven | All versions | 0.23.31 |
| `org.http4s:http4s-ember-core_3` | Maven | From 1.0.0-M1 | 1.0.0-M45 |
| `org.http4s:http4s-ember-core_3` | Maven | From 1.0.0-M1 | 1.0.0-M45 |

Products: Typelevel Http4s.

## How do I fix CVE-2025-59822?

Upgrade org.http4s:http4s-ember-core_2.13 to a fixed version for your release line: 0.23.31 or 1.0.0-M45.

## Is CVE-2025-59822 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-59822 exists.

## Other vulnerabilities in http4s

- [CVE-2021-39185](https://insights.sbomify.com/CVE-2021-39185/): Default CORS config allows any origin with credentials (critical 9.1)
- [CVE-2021-41084](https://insights.sbomify.com/CVE-2021-41084/): Response Splitting from unsanitized headers in http4s (high 8.7)
- [CVE-2020-5280](https://insights.sbomify.com/CVE-2020-5280/): Local file inclusion vulnerability in http4s (high 7.6)
- [CVE-2023-22465](https://insights.sbomify.com/CVE-2023-22465/): Http4s has fatal error parsing User-Agent and Server headers (high 7.5)
- [CVE-2021-21294](https://insights.sbomify.com/CVE-2021-21294/): Unbounded connection acceptance in http4s-blaze-server (high 7.5)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-59822 and fix it if it is affected.

What it is: CVE-2025-59822 is a medium-severity vulnerability in http4s, published on 23 Sep 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-59822 exists.

Affected packages and fixed versions:
- org.http4s:http4s-ember-core_2.13 (Maven): affected all versions; fixed in 0.23.31
- org.http4s:http4s-ember-core_2.13 (Maven): affected all versions; fixed in 0.23.31
- org.http4s:http4s-ember-core_2.13 (Maven): affected from 1.0.0-M1; fixed in 1.0.0-M45
- org.http4s:http4s-ember-core_2.13 (Maven): affected from 1.0.0-M1; fixed in 1.0.0-M45
- org.http4s:http4s-ember-core_2.12 (Maven): affected all versions; fixed in 0.23.31
- org.http4s:http4s-ember-core_2.12 (Maven): affected all versions; fixed in 0.23.31
- org.http4s:http4s-ember-core_3 (Maven): affected all versions; fixed in 0.23.31
- org.http4s:http4s-ember-core_3 (Maven): affected all versions; fixed in 0.23.31
- org.http4s:http4s-ember-core_3 (Maven): affected from 1.0.0-M1; fixed in 1.0.0-M45
- org.http4s:http4s-ember-core_3 (Maven): affected from 1.0.0-M1; fixed in 1.0.0-M45

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-2025-59822/ (Markdown: https://insights.sbomify.com/CVE-2025-59822/index.md)
```

## Sources

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

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