Skip to content
This repository has been archived by the owner on May 3, 2022. It is now read-only.

Http request which redirect to another hostname do not strip authorization header

Moderate
bryanmacfarlane published GHSA-9w6v-m7wp-jwg4 Apr 29, 2020

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

#27

For more information

If you have any questions or comments about this advisory:

Severity

Moderate

CVE ID

CVE-2020-11021

Weaknesses

No CWEs