{"id":"GHSA-x426-x7cc-3fpc","revision":"a5cb7c42d34e4d0290646e5790c961c1","records":[{"revision":"a5cb7c42d34e4d0290646e5790c961c1","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"GHSA-x426-x7cc-3fpc","aliases":["CVE-2026-48022"],"title":"@hapi/wreck: Sensitive credential headers leak across cross-port and cross-scheme redirects","description":"### 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.","state":0,"publishedAt":"2026-06-11T13:27:05+00:00","modifiedAt":"2026-09-10T03:50:51.2104595+00:00","affected":[{"ecosystem":"npm","name":"@hapi/wreck","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"18.1.2"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"MODERATE"}],"references":["https://github.com/hapijs/wreck/security/advisories/GHSA-x426-x7cc-3fpc","https://github.com/hapijs/wreck/commit/b93323b63ad3adb14d2b4019d77219182211641e","https://github.com/hapijs/wreck"],"sourceUrl":"https://github.com/advisories/GHSA-x426-x7cc-3fpc","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-x426-x7cc-3fpc","identifiers":["GHSA-x426-x7cc-3fpc","CVE-2026-48022"]},"retained":false,"historicalAffected":[]}],"coverage":[]}