CVE-2022-3224: Parse url Parse-url Parses Http URLs Incorrectly, Vulnerability
MODERATECVE-2022-3224 is a MODERATE (CVSS 6.1) parse-url parses http urls incorrectly, vulnerability (CWE-115: Misinterpretation of Input) affecting Parse url libraries in the npm ecosystem. The issue involves parse-url parses http urls incorrectly, making it vulnerable to host name spoofing. Remediation is available by upgrading affected packages to version 8.1.0.
CVE-2022-3224 at a Glance
Security Impact
CVSS: 6.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N).
How to Fix CVE-2022-3224
To remediate this vulnerability, upgrade all affected Parse url dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install parse-url@8.1.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls parse-url
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2022-3224, inspect your project dependencies using npm:
npm ls parse-url
Analyze the terminal output to locate any version of Parse url in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 8.1.0), your application is affected.
Note: The npm ls parse-url command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-115: Misinterpretation of Input, where the product misinterprets an input, whether from an attacker or another product, in a security-relevant fashion. In Parse url, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2022-3224 Affected Parse url Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
parse-url
|
npm |
< 8.1.0
|
8.1.0
|
References
Frequently Asked Questions
What is CVE-2022-3224?
Which Parse url versions are affected?
What version fixes CVE-2022-3224?
Is parse-url affected?
What is the CVSS score of CVE-2022-3224?
What CWE is associated with CVE-2022-3224?
How can I check npm dependencies for CVE-2022-3224?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-pqw5-jmp5-px4v",
"modified" : "2022-09-19T20:25:17Z",
"published" : "2022-09-16T00:00:39Z",
"aliases" : [ "CVE-2022-3224" ],
"summary" : "parse-url parses http URLs incorrectly, making it vulnerable to host name spoofing",
"details" : "parse-url prior to 8.1.0 is vulnerable to Misinterpretation of Input. parse-url parses certain http or https URLs incorrectly, identifying the URL's protocol as ssh. It may also parse the host name incorrectly.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "parse-url"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "8.1.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-3224"
}, {
"type" : "WEB",
"url" : "https://github.com/ionicabizau/parse-url/commit/9cacf38de02db0fb1358bd6ec04543e523cd6a8e"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/ionicabizau/parse-url"
}, {
"type" : "WEB",
"url" : "https://huntr.dev/bounties/3587a567-7fcd-4702-b7c9-d9ca565e3c62"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-115" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2022-09-16T21:21:19Z",
"nvd_published_at" : "2022-09-15T12:15:00Z"
}
}