Vulnerabilities in pkg:npm/cross-fetch
PACKAGECVE-2022-1365 is a MODERATE (CVSS 6.1) incorrect authorization vulnerability (CWE-863: Incorrect Authorization) affecting Withdrawn Advisory libraries in the npm ecosystem. The issue involves incorrect authorization in cross-fetch. Remediation is available by upgrading affected packages to version 3.1.5, 2.2.6.
pkg:npm/cross-fetch
Vulnerability advisories affecting package pkg:npm/cross-fetch. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-7gc6-qh9x-w6h8 | CVE-2022-1365 | MODERATE | Withdrawn Advisory: Incorrect Authorization in cross-fetch |
CVE-2022-1365 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-1365
To remediate this vulnerability, upgrade all affected Withdrawn Advisory 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 cross-fetch@3.1.5
npm install cross-fetch@2.2.6
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls cross-fetch
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2022-1365, inspect your project dependencies using npm:
npm ls cross-fetch
Analyze the terminal output to locate any version of Withdrawn Advisory in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.1.5), your application is affected.
Note: The npm ls cross-fetch 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-863: Incorrect Authorization, where the product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. In Withdrawn Advisory, 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-1365 Affected Withdrawn Advisory Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
cross-fetch
|
npm |
≥ 3.0.0
< 3.1.5
|
3.1.5
|
|
cross-fetch
|
npm |
< 2.2.6
|
2.2.6
|
References
Frequently Asked Questions
What is CVE-2022-1365?
Which Withdrawn Advisory versions are affected?
What version fixes CVE-2022-1365?
Is cross-fetch affected?
What is the CVSS score of CVE-2022-1365?
What CWE is associated with CVE-2022-1365?
How can I check npm dependencies for CVE-2022-1365?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-7gc6-qh9x-w6h8",
"modified" : "2025-10-08T19:22:14Z",
"published" : "2022-04-17T00:00:32Z",
"withdrawn" : "2025-10-08T19:22:14Z",
"aliases" : [ "CVE-2022-1365" ],
"summary" : "Withdrawn Advisory: Incorrect Authorization in cross-fetch",
"details" : "## Withdrawn Advisory\nThis advisory has been withdrawn because the vulnerability originates from a dependency. For more information, see the `Maintainer` comments in https://huntr.com/bounties/ab55dfdd-2a60-437a-a832-e3efe3d264ac.\n\n## Original Description\nWhen fetching a remote url with Cookie if it get Location response header then it will follow that url and try to fetch that url with provided cookie . So cookie is leaked here to thirdparty.\nEx: you try to fetch example.com with cookie and if it get redirect url to attacker.com then it fetch that redirect url with provided cookie .",
"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" : "cross-fetch"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.0.0"
}, {
"fixed" : "3.1.5"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "cross-fetch"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.2.6"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-1365"
}, {
"type" : "WEB",
"url" : "https://github.com/lquixada/cross-fetch/pull/135"
}, {
"type" : "WEB",
"url" : "https://github.com/lquixada/cross-fetch/commit/a3b3a9481091ddd06b8f83784ba9c4e034dc912a"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/lquixada/cross-fetch"
}, {
"type" : "WEB",
"url" : "https://huntr.dev/bounties/ab55dfdd-2a60-437a-a832-e3efe3d264ac"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-359", "CWE-863" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2022-04-28T20:45:25Z",
"nvd_published_at" : "2022-04-15T23:15:00Z"
}
}