{"id":"GHSA-8v38-pw62-9cw2","summary":"url-parse Incorrectly parses URLs that include an '@'","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.","aliases":["CVE-2022-0639"],"modified":"2026-02-20T23:33:48.876728Z","published":"2022-02-18T00:00:33Z","database_specific":{"severity":"MODERATE","github_reviewed":true,"github_reviewed_at":"2022-02-22T18:08:05Z","nvd_published_at":"2022-02-17T18:15:00Z","cwe_ids":["CWE-639"]},"references":[{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-0639"},{"type":"WEB","url":"https://github.com/unshiftio/url-parse/commit/ef45a1355375a8244063793a19059b4f62fc8788"},{"type":"PACKAGE","url":"https://github.com/unshiftio/url-parse"},{"type":"WEB","url":"https://huntr.dev/bounties/83a6bc9a-b542-4a38-82cd-d995a1481155"},{"type":"WEB","url":"https://lists.debian.org/debian-lts-announce/2023/02/msg00030.html"},{"type":"WEB","url":"https://lists.debian.org/debian-lts-announce/2025/12/msg00024.html"}],"affected":[{"package":{"name":"url-parse","ecosystem":"npm","purl":"pkg:npm/url-parse"},"ranges":[{"type":"SEMVER","events":[{"introduced":"1.0.0"},{"fixed":"1.5.7"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/02/GHSA-8v38-pw62-9cw2/GHSA-8v38-pw62-9cw2.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N"}]}