# CVE-2026-48022: @hapi/wreck: Sensitive credential headers leak across cross-port and cross-scheme redirects

> An attacker can capture sensitive credentials like tokens and cookies by exploiting a flaw in cross-origin redirect handling that ignores scheme and port changes.

- **Severity:** Medium 6.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:R/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:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 17 Jul 2026
- **Updated:** 20 Jul 2026
- **Also known as:** GHSA-x426-x7cc-3fpc, MINI-3478-4g29-54qw, MINI-4858-rr3g-gvhm, MINI-4gm5-8q5x-rx9r, MINI-6q84-77wm-wr7r, MINI-748x-xv56-r9v7, MINI-7p3r-c928-3xrq, MINI-7rfp-pjg4-4qr8, MINI-8m5g-7jw6-x79q, MINI-fr45-j7r7-vq63, MINI-g93v-xcjm-gpv7, MINI-hcpj-p2p2-x8rv, MINI-v8cv-6v99-m3ww, MINI-vq48-3rv5-8pf2, MINI-vvxv-c3qx-xmfr, MINI-wf9x-gwxm-6fpg, ROOT-APP-NPM-CVE-2026-48022

## What is CVE-2026-48022?

CVE-2026-48022 is a medium-severity vulnerability in hapijs wreck, published on 17 Jul 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

### Official description

@hapi/wreck is an HTTP client utility. Prior to 18.1.2, Wreck strips credential headers including Authorization, Cookie, and Proxy-Authorization before following a cross-origin redirect, but the origin check compares hostnames only and ignores scheme and port, so credentials are forwarded intact across same-host port changes and HTTPS-to-HTTP downgrades, allowing a co-tenant on an adjacent port or a network-position attacker capable of forging a redirect to capture bearer tokens, session cookies, and proxy credentials and impersonate the victim against the upstream service. This issue is fixed in version 18.1.2.

Weakness: CWE-522 (Insufficiently Protected Credentials), CWE-346 (Origin Validation Error), CWE-319 (Cleartext Transmission of Sensitive Information)

## Which versions are affected by CVE-2026-48022?

2 open source packages ship an affected version, including @hapi/wreck.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `@hapi/wreck` | npm | All versions | 18.1.2 |
| `@hapi/wreck` | npm | All versions | 18.1.2 |

## How do I fix CVE-2026-48022?

Upgrade @hapi/wreck to 18.1.2 or later.

## Is CVE-2026-48022 being exploited?

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

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-48022 and fix it if it is affected.

What it is: CVE-2026-48022 is a medium-severity vulnerability in hapijs wreck, published on 17 Jul 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2026-48022 in the wild and no public exploit code.

Affected packages and fixed versions:
- @hapi/wreck (npm): affected all versions; fixed in 18.1.2
- @hapi/wreck (npm): affected all versions; fixed in 18.1.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-2026-48022/ (Markdown: https://insights.sbomify.com/CVE-2026-48022/index.md)
```

## Sources

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

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