CVE-2023-45288: net/http, x/net/http2 Close Connections When Receiving Too Vulnerability
MODERATECVE-2023-45288 is a MODERATE (CVSS 5.3) close connections when receiving too vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting net/http, x/net/http2 libraries in the Go ecosystem. The issue involves close connections when receiving too many headers. Remediation is available by upgrading affected packages to version 1.21.9, 0.23.0, 1.22.2.
CVE-2023-45288 at a Glance
Security Impact
CVSS: 5.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L).
How to Fix CVE-2023-45288
To remediate this vulnerability, upgrade all affected net/http, x/net/http2 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 net/http to 1.21.9
Upgrade golang.org/x/net/http2 to 0.23.0
Upgrade net/http to 1.22.2
Upgrade golang.org/x/net to 0.23.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for net/http
How to Check if You Are Affected
To determine whether your application is affected by CVE-2023-45288, inspect your project dependencies for net/http, x/net/http2:
inspect dependencies for net/http
Analyze the terminal output to locate any version of net/http, x/net/http2 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.21.9), 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 CWE-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In net/http, x/net/http2, 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
CVE-2023-45288 Affected net/http, x/net/http2 Versions
4 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
net/http
|
Go |
< 1.21.9
|
1.21.9
|
|
golang.org/x/net/http2
|
Go |
< 0.23.0
|
0.23.0
|
|
net/http
|
Go |
≥ 1.22.0-0
< 1.22.2
|
1.22.2
|
|
golang.org/x/net
|
Go |
< 0.23.0
|
0.23.0
|
References
Frequently Asked Questions
What is CVE-2023-45288?
Which net/http, x/net/http2 versions are affected?
What version fixes CVE-2023-45288?
Is net/http affected?
Is golang.org/x/net/http2 affected?
What is the CVSS score of CVE-2023-45288?
What CWE is associated with CVE-2023-45288?
How can I check Go dependencies for CVE-2023-45288?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-4v7x-pqxf-cx7m",
"modified" : "2025-11-04T22:15:09Z",
"published" : "2024-04-04T21:30:32Z",
"aliases" : [ "CVE-2023-45288" ],
"summary" : "net/http, x/net/http2: close connections when receiving too many headers",
"details" : "An attacker may cause an HTTP/2 endpoint to read arbitrary amounts of header data by sending an excessive number of CONTINUATION frames. Maintaining HPACK state requires parsing and processing all HEADERS and CONTINUATION frames on a connection. When a request's headers exceed MaxHeaderBytes, no memory is allocated to store the excess headers, but they are still parsed. This permits an attacker to cause an HTTP/2 endpoint to read arbitrary amounts of header data, all associated with a request which is going to be rejected. These headers can include Huffman-encoded data which is significantly more expensive for the receiver to decode than for an attacker to send. The fix sets a limit on the amount of excess header frames we will process before closing a connection.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "net/http"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.21.9"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "golang.org/x/net/http2"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.23.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "net/http"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.22.0-0"
}, {
"fixed" : "1.22.2"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "golang.org/x/net"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.23.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-45288"
}, {
"type" : "WEB",
"url" : "https://go.dev/cl/576155"
}, {
"type" : "WEB",
"url" : "https://go.dev/issue/65051"
}, {
"type" : "WEB",
"url" : "https://groups.google.com/g/golang-announce/c/YgW0sx8mN3M"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/QRYFHIQ6XRKRYBI2F5UESH67BJBQXUPT"
}, {
"type" : "WEB",
"url" : "https://nowotarski.info/http2-continuation-flood-technical-details"
}, {
"type" : "WEB",
"url" : "https://pkg.go.dev/vuln/GO-2024-2687"
}, {
"type" : "WEB",
"url" : "https://security.netapp.com/advisory/ntap-20240419-0009"
}, {
"type" : "WEB",
"url" : "https://www.kb.cert.org/vuls/id/421644"
}, {
"type" : "WEB",
"url" : "http://www.openwall.com/lists/oss-security/2024/04/03/16"
}, {
"type" : "WEB",
"url" : "http://www.openwall.com/lists/oss-security/2024/04/05/4"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-400" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-04-04T23:02:57Z",
"nvd_published_at" : "2024-04-04T21:15:16Z"
}
}