ghsa-8v38-pw62-9cw2
Vulnerability from github
Published
2022-02-18 00:00
Modified
2023-09-11 22:51
Severity ?
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,
js
parse(\"http://@/127.0.0.1\")
Will return:
yaml
{
slashes: true,
protocol: 'http:',
hash: '',
query: '',
pathname: '/127.0.0.1',
auth: '',
host: '',
port: '',
hostname: '',
password: '',
username: '',
origin: 'null',
href: 'http:///127.0.0.1'
}
If 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.
{ "affected": [ { "package": { "ecosystem": "npm", "name": "url-parse" }, "ranges": [ { "events": [ { "introduced": "0" }, { "fixed": "1.5.7" } ], "type": "ECOSYSTEM" } ] } ], "aliases": [ "CVE-2022-0639" ], "database_specific": { "cwe_ids": [ "CWE-639" ], "github_reviewed": true, "github_reviewed_at": "2022-02-22T18:08:05Z", "nvd_published_at": "2022-02-17T18:15:00Z", "severity": "MODERATE" }, "details": "A specially crafted URL with an \u0027@\u0027 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: \u0027http:\u0027,\n hash: \u0027\u0027,\n query: \u0027\u0027,\n pathname: \u0027/127.0.0.1\u0027,\n auth: \u0027\u0027,\n host: \u0027\u0027,\n port: \u0027\u0027,\n hostname: \u0027\u0027,\n password: \u0027\u0027,\n username: \u0027\u0027,\n origin: \u0027null\u0027,\n href: \u0027http:///127.0.0.1\u0027\n }\n```\nIf the \u0027hostname\u0027 or \u0027origin\u0027 attributes of the output from url-parse are used in security decisions and the final \u0027href\u0027 attribute of the output is then used to make a request, the decision may be incorrect.\n", "id": "GHSA-8v38-pw62-9cw2", "modified": "2023-09-11T22:51:42Z", "published": "2022-02-18T00:00:33Z", "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" } ], "schema_version": "1.4.0", "severity": [ { "score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N", "type": "CVSS_V3" } ], "summary": "url-parse Incorrectly parses URLs that include an \u0027@\u0027" }
Loading…
Loading…
Sightings
Author | Source | Type | Date |
---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
- Confirmed: The vulnerability is confirmed from an analyst perspective.
- Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
- Patched: This vulnerability was successfully patched by the user reporting the sighting.
- Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
- Not confirmed: The user expresses doubt about the veracity of the vulnerability.
- Not patched: This vulnerability was not successfully patched by the user reporting the sighting.