Skip to content

← Public intelligence

npm package

@hapi/wreck

Open actionable advisories and recorded vendor fixes. This public package view has no inventory attached and cannot establish whether your deployment is affected. A vendor fix never resolves your finding; verify your installed version and the source guidance.

Open advisories

2 actionable advisories, newest first. Withdrawn advisories and news are excluded. Coverage is partial.

  1. Medium, CVSS 6.5npmAmendedPublished

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

    CVE-2026-48022 · GHSA-x426-x7cc-3fpc

    Affected
    • npm @hapi/wreck < 18.1.2
    Fixed in
    18.1.2· Vendor fix available
    Issue
    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.

    Recommended action: Upgrade to 18.1.2 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  2. Medium, CVSS 6.3npmAmendedPublished

    @hapi/wreck leaks sensitive Proxy-Authorization header across cross-hostname redirects

    CVE-2026-44979 · GHSA-vhjm-w67q-g75c

    Affected
    • npm @hapi/wreck < 18.1.1
    Fixed in
    18.1.1· Vendor fix available
    Issue
    Impact When @hapi/wreck follows a 3xx redirect to a different hostname, only the Authorization and Cookie headers are stripped. The standard credential header Proxy-Authorization is forwarded intact to the redirect target, potentially exposing forward-proxy credentials to a host outside the original trust boundary. Redirect following is opt-in. The redirects option defaults to false (no redirections followed), so applications are only affected if they have explicitly set redirects to a positive integer on the request or via Wreck.defaults({ redirects: ... }). Patches @hapi/wreck 18.1.1 extends the cross-hostname strip set to include proxy-authorization. Upgrade to 18.1.1 or later. Workarounds If upgrading is not immediately possible: - Leave redirects at its default (false) — applications that never enable redirect following are not affected. - If redirects are required, set redirects: 0 when calling endpoints with sensitive headers, or strip Proxy-Authorization from the headers…

    Recommended action: Upgrade to 18.1.1 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →