CVE-2026-48022: @hapi/wreck Sensitive Credential Headers Leak Across Vulnerability

MODERATE
Advisory Identifier: GHSA-x426-x7cc-3fpc
Advisory Summary

CVE-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

CVE Identifier CVE-2026-48022
GHSA Identifier GHSA-x426-x7cc-3fpc
Severity MODERATE
CVSS v3.1 Base Score 6.5
CWE Classification CWE-319: Cleartext Transmission of Sensitive Information
Affected Product @hapi/wreck
Package Ecosystem npm
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (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.

@hapi/wreck fixed: 18.1.2
npm install @hapi/wreck@18.1.2
Verify Direct and Transitive Dependencies

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

### Impact Wreck 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. ### Patches Upgrade to >= 18.1.2. ### Workarounds - Set `redirects: 0` (default) and handle redirects manually with a strict origin check. - Use the `beforeRedirect` hook to inspect the redirect target and abort or strip sensitive headers before the follow-on request.

CVE-2026-48022 Affected @hapi/wreck Versions

1 component(s)
Fixed Versions:
18.1.2
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?
CVE-2026-48022 is a security vulnerability in @hapi/wreck involving Sensitive credential headers leak across cross-port and cross-scheme redirects under CWE-319: Cleartext Transmission of Sensitive Information.
Which @hapi/wreck versions are affected?
Affected versions include releases prior to 18.1.2 across affected packages: @hapi/wreck.
What version fixes CVE-2026-48022?
Upgrading to 18.1.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @hapi/wreck affected?
Yes, @hapi/wreck is affected in releases prior to 18.1.2. Upgrade your dependency to 18.1.2 or later.
What is the CVSS score of CVE-2026-48022?
CVE-2026-48022 has a CVSS v3.1 base score of 6.5 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2026-48022?
CVE-2026-48022 is classified under CWE-319: Cleartext Transmission of Sensitive Information (The product transmits sensitive or security-critical data in cleartext in a communication channel that can be sniffed by unauthorized actors.).
How can I check npm dependencies for CVE-2026-48022?
Run the dependency tree command: 'npm ls @hapi/wreck'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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
  }
}