Skip to content

Http request which redirect to another hostname do not strip authorization header in @actions/http-client

Moderate severity GitHub Reviewed Published Apr 29, 2020 in actions/http-client • Updated Feb 1, 2023

Package

npm @actions/http-client (npm)

Affected versions

< 1.0.8

Patched versions

1.0.8

Description

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.

Patches

The problem is fixed in 1.0.8 at npm here. In 1.0.8, the authorization header is stripped before making the redirected request if the hostname is different.

Workarounds

None.

References

actions/http-client#27

For more information

If you have any questions or comments about this advisory:

References

@bryanmacfarlane bryanmacfarlane published to actions/http-client Apr 29, 2020
Reviewed Apr 29, 2020
Published to the GitHub Advisory Database Apr 29, 2020
Published by the National Vulnerability Database Apr 29, 2020
Last updated Feb 1, 2023

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
High
Privileges required
Low
User interaction
None
Scope
Changed
Confidentiality
High
Integrity
None
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:N/A:N

EPSS score

0.156%
(53rd percentile)

Weaknesses

CVE ID

CVE-2020-11021

GHSA ID

GHSA-9w6v-m7wp-jwg4

Source code

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.