CVE-2020-11021: @actions/http client Http Request Which Redirect To Vulnerability
MODERATECVE-2020-11021 is a MODERATE (CVSS 6.3) http request which redirect to vulnerability (CWE-200: Exposure of Sensitive Information to an Unauthorized Actor) affecting @actions/http client libraries in the npm ecosystem. The issue involves http request which redirect to another hostname do not strip authorization header in @actions/http-client. Remediation is available by upgrading affected packages to version 1.0.8.
CVE-2020-11021 at a Glance
Security Impact
CVSS: 6.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:N/A:N).
How to Fix CVE-2020-11021
To remediate this vulnerability, upgrade all affected @actions/http client 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 @actions/http-client@1.0.8
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @actions/http-client
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2020-11021, inspect your project dependencies using npm:
npm ls @actions/http-client
Analyze the terminal output to locate any version of @actions/http client in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.0.8), your application is affected.
Note: The npm ls @actions/http-client 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-200: Exposure of Sensitive Information to an Unauthorized Actor, where the product exposes sensitive information to an actor that is not explicitly authorized to have access to that information. In @actions/http client, 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-2020-11021 Affected @actions/http client Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@actions/http-client
|
npm |
< 1.0.8
|
1.0.8
|
References
Frequently Asked Questions
What is CVE-2020-11021?
Which @actions/http client versions are affected?
What version fixes CVE-2020-11021?
Is @actions/http-client affected?
What is the CVSS score of CVE-2020-11021?
What CWE is associated with CVE-2020-11021?
How can I check npm dependencies for CVE-2020-11021?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-9w6v-m7wp-jwg4",
"modified" : "2021-08-25T21:03:11Z",
"published" : "2020-04-29T17:58:53Z",
"aliases" : [ "CVE-2020-11021" ],
"summary" : "Http request which redirect to another hostname do not strip authorization header in @actions/http-client",
"details" : "### Impact\nIf consumers of the http-client:\n 1. make an http request with an authorization header\n 2. that request leads to a redirect (302) and\n 3. the redirect url redirects to another domain or hostname \n\nThe authorization header will get passed to the other domain.\n\nNote that since this library is for actions, the GITHUB_TOKEN that is available in actions is generated and scoped per job with [these permissions](https://help.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token#permissions-for-the-github_token).\n\n### Patches\nThe problem is fixed in 1.0.8 at [npm here](https://www.npmjs.com/package/@actions/http-client). In 1.0.8, the authorization header is stripped before making the redirected request if the hostname is different.\n\n### Workarounds\nNone.\n\n### References\nhttps://github.com/actions/http-client/pull/27\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in https://github.com/actions/http-client/issues",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@actions/http-client"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.0.8"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/actions/http-client/security/advisories/GHSA-9w6v-m7wp-jwg4"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-11021"
}, {
"type" : "WEB",
"url" : "https://github.com/actions/http-client/pull/27"
}, {
"type" : "WEB",
"url" : "https://github.com/actions/http-client/commit/f6aae3dda4f4c9dc0b49737b36007330f78fd53a"
}, {
"type" : "WEB",
"url" : "https://github.com/actions/http-client"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-200" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2020-04-29T17:58:41Z",
"nvd_published_at" : "2020-04-29T18:15:00Z"
}
}