CVE-2026-48022: @hapi/wreck Sensitive Credential Headers Leak Across Vulnerability
MODERATECVE-2026-48022 is a MODERATE (CVSS 6.5) sensitive credential headers leak across vulnerability (CWE-319: Cleartext Transmission of Sensitive Information) affecting @hapi/wreck libraries in the npm ecosystem. The issue involves sensitive credential headers leak across cross-port and cross-scheme redirects. Remediation is available by upgrading affected packages to version 18.1.2.
CVE-2026-48022 at a Glance
Security Impact
CVSS: 6.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N).
How to Fix CVE-2026-48022
To remediate this vulnerability, upgrade all affected @hapi/wreck dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install @hapi/wreck@18.1.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @hapi/wreck
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2026-48022, inspect your project dependencies using npm:
npm ls @hapi/wreck
Analyze the terminal output to locate any version of @hapi/wreck in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 18.1.2), your application is affected.
Note: The npm ls @hapi/wreck command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-319: Cleartext Transmission of Sensitive Information, where the product transmits sensitive or security-critical data in cleartext in a communication channel that can be sniffed by unauthorized actors. In @hapi/wreck, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-48022 Affected @hapi/wreck Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@hapi/wreck
|
npm |
< 18.1.2
|
18.1.2
|
References
Frequently Asked Questions
What is CVE-2026-48022?
Which @hapi/wreck versions are affected?
What version fixes CVE-2026-48022?
Is @hapi/wreck affected?
What is the CVSS score of CVE-2026-48022?
What CWE is associated with CVE-2026-48022?
How can I check npm dependencies for CVE-2026-48022?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-x426-x7cc-3fpc",
"modified" : "2026-06-11T13:27:05Z",
"published" : "2026-06-11T13:27:05Z",
"aliases" : [ "CVE-2026-48022" ],
"summary" : "@hapi/wreck: Sensitive credential headers leak across cross-port and cross-scheme redirects",
"details" : "### Impact\nWreck strips credential headers (Authorization, Cookie, Proxy-Authorization) before following a cross-origin redirect, but the origin check compares hostnames only and ignores scheme and port. As a result, 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. The fix replaces the hostname comparison with a full-origin comparison (scheme, host, and port), aligning the behavior with the WHATWG Fetch same-origin definition used by browsers.\n\n### Patches\nUpgrade to >= 18.1.2.\n\n### Workarounds\n- Set `redirects: 0` (default) and handle redirects manually with a strict origin check.\n- Use the `beforeRedirect` hook to inspect the redirect target and abort or strip sensitive headers before the follow-on request.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@hapi/wreck"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "18.1.2"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/hapijs/wreck/security/advisories/GHSA-x426-x7cc-3fpc"
}, {
"type" : "WEB",
"url" : "https://github.com/hapijs/wreck/commit/b93323b63ad3adb14d2b4019d77219182211641e"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/hapijs/wreck"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-200", "CWE-319", "CWE-346", "CWE-522", "CWE-940" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-06-11T13:27:05Z",
"nvd_published_at" : null
}
}