Vulnerabilities in pkg:npm/@actions/http-client

PACKAGE
Advisory Identifier: GHSA-9w6v-m7wp-jwg4
Advisory Summary

CVE-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.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/@actions/http-client

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/@actions/http-client. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-9w6v-m7wp-jwg4 CVE-2020-11021 MODERATE Http request which redirect to another hostname do not strip authorization header in @actions/http-client

CVE-2020-11021 at a Glance

CVE Identifier CVE-2020-11021
GHSA Identifier GHSA-9w6v-m7wp-jwg4
Severity MODERATE
CVSS v3.1 Base Score 6.3
CWE Classification CWE-200: Exposure of Sensitive Information to an Unauthorized Actor
Affected Product @actions/http client
Package Ecosystem npm
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (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.

@actions/http-client fixed: 1.0.8
npm install @actions/http-client@1.0.8
Verify Direct and Transitive Dependencies

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

### Impact If consumers of the http-client: 1. make an http request with an authorization header 2. that request leads to a redirect (302) and 3. the redirect url redirects to another domain or hostname The authorization header will get passed to the other domain. Note 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). ### Patches The 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. ### Workarounds None. ### References https://github.com/actions/http-client/pull/27 ### For more information If you have any questions or comments about this advisory: * Open an issue in https://github.com/actions/http-client/issues

CVE-2020-11021 Affected @actions/http client Versions

1 component(s)
Fixed Versions:
1.0.8
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?
CVE-2020-11021 is a security vulnerability in @actions/http client involving Http request which redirect to another hostname do not strip authorization header in @actions/http-client under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor.
Which @actions/http client versions are affected?
Affected versions include releases prior to 1.0.8 across affected packages: @actions/http-client.
What version fixes CVE-2020-11021?
Upgrading to 1.0.8 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @actions/http-client affected?
Yes, @actions/http-client is affected in releases prior to 1.0.8. Upgrade your dependency to 1.0.8 or later.
What is the CVSS score of CVE-2020-11021?
CVE-2020-11021 has a CVSS v3.1 base score of 6.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:N/A:N.
What CWE is associated with CVE-2020-11021?
CVE-2020-11021 is classified under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor (The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.).
How can I check npm dependencies for CVE-2020-11021?
Run the dependency tree command: 'npm ls @actions/http-client'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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"
  }
}