GHSA-m7vp-hqwv-7m5x

Suggest an improvement
Source
https://github.com/advisories/GHSA-m7vp-hqwv-7m5x
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/01/GHSA-m7vp-hqwv-7m5x/GHSA-m7vp-hqwv-7m5x.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-m7vp-hqwv-7m5x
Related
Published
2022-01-12T22:33:04Z
Modified
2022-01-11T16:45:39Z
Summary
Unbounded memory usage on exposed HTTP/2 (non-gRPC) endpoints
Details

Impact

The net/http Go package has a reported vulnerability tracked under CVE-2021-44716 which allows attacker controlled HTTP/2 requests to trigger unbounded memory usage in HTTP/2 endpoints. gRPC endpoints are not vulnerable as they rely on their own HTTP/2 implementation instead of the net/http package. HTTP/2 endpoints consuming the net/http package within SPIRE server and agent (or other components in this repository) that are on by default include the following: - OIDC Discovery Provider - K8s Workload Registrar in webhook mode

The following endpoints are vulnerable when enabled: - SPIRE server bundle endpoint (i.e. Federation API)

The following endpoints are NOT vulnerable, since HTTP/2 support in go is not enabled on non-TLS protected endpoints: - SPIRE server/agent metrics endpoint when configured for Prometheus - SPIRE server/agent health endpoints - SPIRE server/agent profiling endpoints

Patches

SPIRE 1.0.3 and 1.1.3 have been released with an upgraded Go toolchain which patches the vulnerability

Workarounds

The vulnerability can be worked around entirely by including the http2server=0 value in the GODEBUG environment variable (see https://github.com/golang/go/issues/50058). This turns off HTTP/2 support on all non-gRPC endpoints. They will still function with HTTP/1.1.

The risk associated with this vulnerability can be somewhat mitigated by limiting the exposure of the endpoints in question. If necessary, vulnerable components or endpoints that are optionally configured can be disabled temporarily.

References

  • https://github.com/golang/go/issues/50058
  • https://go-review.googlesource.com/c/go/+/370574/
  • https://nvd.nist.gov/vuln/detail/CVE-2021-44716
Database specific
{
    "nvd_published_at": null,
    "cwe_ids": [],
    "severity": "HIGH",
    "github_reviewed": true,
    "github_reviewed_at": "2022-01-10T22:07:35Z"
}
References

Affected packages

Go / github.com/spiffe/spire

Package

Name
github.com/spiffe/spire
View open source insights on deps.dev
Purl
pkg:golang/github.com/spiffe/spire

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
1.0.3

Go / github.com/spiffe/spire

Package

Name
github.com/spiffe/spire
View open source insights on deps.dev
Purl
pkg:golang/github.com/spiffe/spire

Affected ranges

Type
SEMVER
Events
Introduced
1.1.0
Fixed
1.1.3