# CVE-2025-48865: Fabio allows HTTP clients to manipulate custom headers it adds

> Attackers can remove or manipulate trusted X-Forwarded headers in Fabio, potentially bypassing security controls in backend applications.

- **Severity:** Critical 9.1 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/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:** 30 May 2025
- **Updated:** 30 May 2025
- **Also known as:** GHSA-q7p4-7xjv-j3wf, GO-2025-3722

## What is CVE-2025-48865?

CVE-2025-48865 is a critical vulnerability in fabiolb fabio, published on 30 May 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Fabio is an HTTP(S) and TCP router for deploying applications managed by consul. Prior to version 1.6.6, Fabio allows clients to remove X-Forwarded headers (except X-Forwarded-For) due to a vulnerability in how it processes hop-by-hop headers. Fabio adds HTTP headers like X-Forwarded-Host and X-Forwarded-Port when routing requests to backend applications. Since the receiving application should trust these headers, allowing HTTP clients to remove or modify them creates potential security vulnerabilities. Some of these custom headers can be removed and, in certain cases, manipulated. The attack relies on the behavior that headers can be defined as hop-by-hop via the HTTP Connection header. This issue has been patched in version 1.6.6.

Weakness: CWE-348 (Use of Less Trusted Source), CWE-345 (Insufficient Verification of Data Authenticity)

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

3 open source packages ship an affected version, including github.com/fabiolb/fabio. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/fabiolb/fabio` | Go | All versions | 1.6.6 |
| `github.com/fabiolb/fabio` | Go | All versions | 1.6.6 |
| `github.com/fabiolb/fabio` | Go | All versions | 1.6.6 |

Products: Fabiolb Fabio.

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

Upgrade github.com/fabiolb/fabio to 1.6.6 or later.

## Is CVE-2025-48865 being exploited?

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

## Fix prompt for AI coding agents

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

What it is: CVE-2025-48865 is a critical vulnerability in fabiolb fabio, published on 30 May 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-48865 exists.

Affected packages and fixed versions:
- github.com/fabiolb/fabio (Go): affected all versions; fixed in 1.6.6
- github.com/fabiolb/fabio (Go): affected all versions; fixed in 1.6.6
- github.com/fabiolb/fabio (Go): affected all versions; fixed in 1.6.6

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

## Sources

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

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