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.
Published: 2026-07-17
Score: 6.5 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

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.

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

Remediation

No vendor fix or workaround currently provided.

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

Thu, 23 Jul 2026 21:45:00 +0000

Type Values Removed Values Added
First Time appeared Hapijs
Hapijs wreck
Vendors & Products Hapijs
Hapijs wreck

Mon, 20 Jul 2026 20:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

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


Fri, 17 Jul 2026 21:30:00 +0000

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'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-07-20T19:10:59.345Z

Reserved: 2026-05-20T17:44:09.587Z

Link: CVE-2026-48022

cve-icon Vulnrichment

Updated: 2026-07-20T18:51:52.701Z

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-07-30T23:30:08Z

Weaknesses
  • CWE-319

    Cleartext Transmission of Sensitive Information

  • CWE-346

    Origin Validation Error

  • CWE-522

    Insufficiently Protected Credentials