{"id":"CVE-2026-48022","aliases":["GHSA-x426-x7cc-3fpc"],"url":"https://o3.security/vulnerability/CVE-2026-48022","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 >= 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.","published":"2026-07-17T21:02:05.980Z","modified":"2026-10-21T02:58:17.226684702Z","cvss":{"score":6.5,"severity":"MEDIUM","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N"},"epss":{"score":0.00176,"percentile":0.07132,"asOf":"2026-08-24"},"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"npm","name":"@hapi/wreck","fixedVersion":"18.1.2"}],"fix":{"url":"https://github.com/hapijs/wreck/commit/b93323b63ad3adb14d2b4019d77219182211641e","label":"hapijs/wreck@b93323b"},"references":[{"type":"WEB","url":"https://github.com/hapijs/wreck/releases/tag/v18.1.2"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/48xxx/CVE-2026-48022.json"},{"type":"ADVISORY","url":"https://github.com/hapijs/wreck/security/advisories/GHSA-x426-x7cc-3fpc"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-48022"},{"type":"FIX","url":"https://github.com/hapijs/wreck/commit/b93323b63ad3adb14d2b4019d77219182211641e"},{"type":"FIX","url":"https://github.com/hapijs/wreck/pull/313"},{"type":"PACKAGE","url":"https://github.com/hapijs/wreck"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-10-21T02:58:17.226684702Z"}}