CVE-2022-41717 — net/http2
MEDIUMCVE-2022-41717 is a medium-severity (CVSS 5.3) CWE-770 vulnerability in golang.org/x/net/http2. A fix is available for golang.org/x/net/http2 — see the affected versions and patch details below.
Excessive memory growth in net/http and golang.org/x/net/http2
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
golang.org/x/net/http2🐹golang.org/x/netReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.
Description
An attacker can cause excessive memory growth in a Go server accepting HTTP/2 requests. HTTP/2 server connections contain a cache of HTTP header keys sent by the client. While the total number of entries in this cache is capped, an attacker sending very large keys can cause the server to allocate approximately 64 MiB per open connection.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐹Go | golang.org/x/net/http2 | all versions | 0.4.0go get golang.org/x/net/http2@v0.4.0 |
| 🐹Go | golang.org/x/net | all versions | 0.4.0go get golang.org/x/net@v0.4.0 |
Affected Products
fedorafedoraprojectgogolanghttp2golangDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for golang.org/x/net/http2, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update golang.org/x/net/http2 to 0.4.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2022-41717 is resolved across your whole dependency graph.
Workarounds
Cap what an attacker can consume: apply request size, rate and timeout limits in front of the affected component, and run it with memory and CPU limits so exhaustion degrades one worker rather than the whole service.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
Within Red Hat OpenShift Container Platform, the grafana container is listed as will not fix. Since OCP 4.10, Grafana itself is not shipped and the Grafana web server is protected behind an OAuth proxy server.
| Product | Fixed in | Advisory |
|---|---|---|
| Logging subsystem for Red Hat OpenShift 5.4 | openshift-logging/lokistack-gateway-rhel8:v5.4.11-10 | RHSA-2023:0632 |
| Logging subsystem for Red Hat OpenShift 5.4 | openshift-logging/eventrouter-rhel8:v0.4.0-95 | RHSA-2023:0931 |
| MTA-6.0-RHEL-8 | mta/mta-admin-addon-rhel8:6.0.1-8 | RHSA-2023:0934 |
| NETWORK-OBSERVABILITY-1.2.0-RHEL-9 | network-observability/network-observability-console-plugin-rhel9:v1.2.0-19 | RHSA-2023:1817 |
| OADP-1.0-RHEL-8 | oadp/oadp-registry-rhel8:1.0.7-3 | RHSA-2023:0692 |
| OADP-1.1-RHEL-8 | oadp/oadp-kubevirt-velero-plugin-rhel8:1.1.2-18 | RHSA-2023:1174 |
| OpenShift Developer Tools and Services for OCP 4.9 | ocp-tools-4/service-binding-operator-bundle:v1.3.3-5 | RHSA-2023:0918 |
| Openshift Serverless 1 on RHEL 8 | openshift-serverless-clients-0:1.6.1-2.el8 | RHSA-2023:1179 |
Frequently Asked Questions
Is CVE-2022-41717 in your dependencies?
Find it across Go, including transitive dependencies.