GHSA-m7vp-hqwv-7m5x: Github.com/spiffe/spire Unbounded Memory Usage On Exposed Vulnerability
HIGHGHSA-m7vp-hqwv-7m5x is a HIGH unbounded memory usage on exposed vulnerability (General Security Weakness) affecting Github.com/spiffe/spire libraries in the Go ecosystem. The issue involves unbounded memory usage on exposed http/2 (non-grpc) endpoints. Remediation is available by upgrading affected packages to version 1.0.3, 1.1.3.
GHSA-m7vp-hqwv-7m5x at a Glance
How to Fix GHSA-m7vp-hqwv-7m5x
To remediate this vulnerability, upgrade all affected Github.com/spiffe/spire dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/spiffe/spire to 1.0.3
Upgrade github.com/spiffe/spire to 1.1.3
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/spiffe/spire
How to Check if You Are Affected
To determine whether your application is affected by GHSA-m7vp-hqwv-7m5x, inspect your project dependencies for Github.com/spiffe/spire:
inspect dependencies for github.com/spiffe/spire
Analyze the terminal output to locate any version of Github.com/spiffe/spire in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.0.3), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under General Security Weakness. In Github.com/spiffe/spire, 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
GHSA-m7vp-hqwv-7m5x Affected Github.com/spiffe/spire Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/spiffe/spire
|
Go |
< 1.0.3
|
1.0.3
|
|
github.com/spiffe/spire
|
Go |
≥ 1.1.0
< 1.1.3
|
1.1.3
|
References
Frequently Asked Questions
What is GHSA-m7vp-hqwv-7m5x?
Which Github.com/spiffe/spire versions are affected?
What version fixes GHSA-m7vp-hqwv-7m5x?
Is github.com/spiffe/spire affected?
What CWE is associated with GHSA-m7vp-hqwv-7m5x?
How can I check Go dependencies for GHSA-m7vp-hqwv-7m5x?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-m7vp-hqwv-7m5x",
"modified" : "2022-01-11T16:45:39Z",
"published" : "2022-01-12T22:33:04Z",
"aliases" : [ ],
"summary" : "Unbounded memory usage on exposed HTTP/2 (non-gRPC) endpoints",
"details" : "### Impact\nThe 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:\n- OIDC Discovery Provider\n- K8s Workload Registrar in webhook mode\n\nThe following endpoints are vulnerable _when enabled_:\n- SPIRE server bundle endpoint (i.e. Federation API)\n\nThe following endpoints are _NOT_ vulnerable, since HTTP/2 support in go is not enabled on non-TLS protected endpoints:\n- SPIRE server/agent metrics endpoint when configured for Prometheus\n- SPIRE server/agent health endpoints\n- SPIRE server/agent profiling endpoints\n\n### Patches\nSPIRE 1.0.3 and 1.1.3 have been released with an upgraded Go toolchain which patches the vulnerability\n\n### Workarounds\nThe 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.\n\nThe 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.\n\n### References\n- https://github.com/golang/go/issues/50058\n- https://go-review.googlesource.com/c/go/+/370574/\n- https://nvd.nist.gov/vuln/detail/CVE-2021-44716\n",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/spiffe/spire"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.0.3"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/spiffe/spire"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.1.0"
}, {
"fixed" : "1.1.3"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/spiffe/spire/security/advisories/GHSA-m7vp-hqwv-7m5x"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2022-01-10T22:07:35Z",
"nvd_published_at" : null
}
}