CVE-2026-48022

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

Published Jul 17, 2026 CVSS 3.1 · 6.5 Medium EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical impact

Wreck is an HTTP client utility that, prior to version 18.1.2, removes credential headers such as Authorization, Cookie, and Proxy-Authorization before following a cross‑origin redirect. However, the origin check compares only the hostname and disregards the URI scheme and port number, so credentials are forwarded unchanged across same‑host port changes and HTTPS‑to‑HTTP downgrades. This flaw permits a co‑tenant on an adjacent port or a network‑position attacker who can forge redirects to capture bearer tokens, session cookies, and proxy credentials, enabling impersonation of the original requester. The weakness stems from improper origin verification and corresponds to CWE‑319, CWE‑346, and CWE‑522.

Affected Systems

The vulnerability affects the Hapi.js Wreck HTTP client versions prior to 18.1.2. Users who rely on Wreck for outbound HTTP requests—particularly in micro‑service or API gateway environments—are potentially exposed. The issue remains as long as code paths that perform redirects use the default behaviour of stripping headers based only on host comparison.

Risk and Exploitability

The CVSS score of 6.5 indicates moderate severity, and the EPSS score of less than 1% shows a very low likelihood of exploitation, though the flaw is not flagged in the CISA KEV. Attackers would need to either control a co‑tenant service running on a neighboring port or position themselves to dictate redirect rules within the network. By exploiting the redirect flaw, they can obtain legitimate credentials and impersonate the client, compromising data confidentiality and integrity of downstream services. The absence of a KEV listing does not diminish the technical risk to affected installations.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Wreck to version 18.1.2 or later, which removes the credential headers before following redirects with identical hostnames.
  • If an immediate upgrade is not possible, configure Wreck to disable automatic redirect following or enable strict origin checking by using custom redirect handlers that compare scheme and port, ensuring credentials are never transmitted to untrusted targets.
  • Review application logs for unexpected redirects and verify that no requests are being forwarded from HTTPS to HTTP or across different ports on the same hostname; adjust gateway or proxy settings to block such patterns.

Generated by OpenCVE AI on July 30, 2026 at 23:22 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-x426-x7cc-3fpc @hapi/wreck: Sensitive credential headers leak across cross-port and cross-scheme redirects
History
Type Values Removed Values Added
First Time appeared Hapijs
Hapijs wreck
Vendors & Products Hapijs
Hapijs wreck
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
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.
Title @hapi/wreck: Sensitive credential headers leak across cross-port and cross-scheme redirects
Weaknesses CWE-319
CWE-346
CWE-522
References
Metrics cvssV3_1

{'score': 6.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N'}

Weaknesses
  • CWE-319

    Cleartext Transmission of Sensitive Information

  • CWE-346

    Origin Validation Error

  • CWE-522

    Insufficiently Protected Credentials

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Jul 20, 2026, 7:10 PM
Reserved
May 20, 2026, 5:44 PM
Status
Deferred
Published
Jul 17, 2026, 10:17 PM
Modified
Oct 24, 2026, 8:10 PM