{"id":"GHSA-x426-x7cc-3fpc","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 \u003e= 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.","aliases":["CVE-2026-48022"],"modified":"2026-09-10T03:50:51.210459476Z","published":"2026-06-11T13:27:05Z","database_specific":{"github_reviewed_at":"2026-06-11T13:27:05Z","nvd_published_at":null,"cwe_ids":["CWE-200","CWE-319","CWE-346","CWE-522","CWE-940"],"severity":"MODERATE","github_reviewed":true},"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"}],"affected":[{"package":{"name":"@hapi/wreck","ecosystem":"npm","purl":"pkg:npm/%40hapi/wreck"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"18.1.2"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/06/GHSA-x426-x7cc-3fpc/GHSA-x426-x7cc-3fpc.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N"}]}