# CVE-2025-6442: Ruby WEBrick read_header HTTP Request Smuggling Vulnerability

> Remote attackers can smuggle arbitrary HTTP requests in Ruby WEBrick when deployed behind a specific HTTP proxy, bypassing security controls.

- **Severity:** Medium 6.5 (`CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:H/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:** 25 Jun 2025
- **Updated:** 25 Jun 2025
- **Also known as:** AZL-64352, AZL-64355, AZL-64364, AZL-64367, DEBIAN-CVE-2025-6442, GHSA-r995-q44h-hr64, OESA-2025-1930, UBUNTU-CVE-2025-6442, USN-7709-1

## What is CVE-2025-6442?

CVE-2025-6442 is a medium-severity vulnerability in Ruby WEBrick, published on 25 Jun 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Ruby WEBrick read_header HTTP Request Smuggling Vulnerability. This vulnerability allows remote attackers to smuggle arbitrary HTTP requests on affected installations of Ruby WEBrick. This issue is exploitable when the product is deployed behind an HTTP proxy that fulfills specific conditions.

The specific flaw exists within the read_headers method. The issue results from the inconsistent parsing of terminators of HTTP headers. An attacker can leverage this vulnerability to smuggle arbitrary HTTP requests. Was ZDI-CAN-21876.

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

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

2 open source packages ship an affected version, including webrick. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `webrick` | RubyGems | All versions | 1.8.2 |
| `webrick` | RubyGems | All versions | 1.8.2 |

Products: Ruby-Lang Webrick.

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

Upgrade webrick to 1.8.2 or later.

## Is CVE-2025-6442 being exploited?

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

## Other vulnerabilities in Ruby WEBrick

- [CVE-2009-4492](https://insights.sbomify.com/CVE-2009-4492/): WEBrick Improper Input Validation vulnerability (high 7.5)
- [CVE-2019-11879](https://insights.sbomify.com/CVE-2019-11879/): Path traversal in n/a (medium 5.5)

## Fix prompt for AI coding agents

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

What it is: CVE-2025-6442 is a medium-severity vulnerability in Ruby WEBrick, published on 25 Jun 2025. 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-2025-6442 in the wild and no public exploit code.

Affected packages and fixed versions:
- webrick (RubyGems): affected all versions; fixed in 1.8.2
- webrick (RubyGems): affected all versions; fixed in 1.8.2

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

## Sources

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

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