{"id":"CVE-2022-0639","aliases":["GHSA-8v38-pw62-9cw2"],"url":"https://o3.security/vulnerability/CVE-2022-0639","summary":"Authorization Bypass Through User-Controlled Key in unshiftio/url-parse","details":"A specially crafted URL with an '@' sign but empty user info and no hostname, when parsed with url-parse, url-parse will return the incorrect href. In particular,\n\n```js\nparse(\\\"http://@/127.0.0.1\\\")\n```\nWill return:\n```yaml\n{\n slashes: true,\n protocol: 'http:',\n hash: '',\n query: '',\n pathname: '/127.0.0.1',\n auth: '',\n host: '',\n port: '',\n hostname: '',\n password: '',\n username: '',\n origin: 'null',\n href: 'http:///127.0.0.1'\n }\n```\nIf the 'hostname' or 'origin' attributes of the output from url-parse are used in security decisions and the final 'href' attribute of the output is then used to make a request, the decision may be incorrect.","published":"2022-02-17T00:00:00Z","modified":"2026-08-12T03:51:28.531420865Z","cvss":{"score":6.5,"severity":"MEDIUM","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N"},"epss":null,"cisaKev":null,"exploitsKnown":1,"affectedPackages":[{"ecosystem":"npm","name":"url-parse","fixedVersion":"1.5.7"}],"fix":{"url":"https://github.com/unshiftio/url-parse/commit/ef45a1355375a8244063793a19059b4f62fc8788","label":"unshiftio/url-parse@ef45a13"},"references":[{"type":"WEB","url":"https://huntr.dev/bounties/83a6bc9a-b542-4a38-82cd-d995a1481155"},{"type":"WEB","url":"https://lists.debian.org/debian-lts-announce/2025/12/msg00024.html"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/0xxx/CVE-2022-0639.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-0639"},{"type":"FIX","url":"https://github.com/unshiftio/url-parse/commit/ef45a1355375a8244063793a19059b4f62fc8788"},{"type":"ARTICLE","url":"https://lists.debian.org/debian-lts-announce/2023/02/msg00030.html"},{"type":"PACKAGE","url":"https://github.com/unshiftio/url-parse"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-12T03:51:28.531420865Z"}}