CVE-2024-45338: Golang.org/x/net/html Non-linear Parsing Of Case-insensitive Content Vulnerability
HIGHCVE-2024-45338 is a HIGH non-linear parsing of case-insensitive content vulnerability (CWE-770: Allocation of Resources Without Limits or Throttling) affecting Golang.org/x/net/html libraries in the Go ecosystem. The issue involves non-linear parsing of case-insensitive content in golang.org/x/net/html. Remediation is available by upgrading affected packages to version 0.33.0.
CVE-2024-45338 at a Glance
How to Fix CVE-2024-45338
To remediate this vulnerability, upgrade all affected Golang.org/x/net/html 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 golang.org/x/net/html to 0.33.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for golang.org/x/net/html
How to Check if You Are Affected
To determine whether your application is affected by CVE-2024-45338, inspect your project dependencies for Golang.org/x/net/html:
inspect dependencies for golang.org/x/net/html
Analyze the terminal output to locate any version of Golang.org/x/net/html in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.33.0), 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-770: Allocation of Resources Without Limits or Throttling, where the product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated. In Golang.org/x/net/html, 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-2024-45338 Affected Golang.org/x/net/html Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
golang.org/x/net/html
|
Go |
< 0.33.0
|
0.33.0
|
References
Frequently Asked Questions
What is CVE-2024-45338?
Which Golang.org/x/net/html versions are affected?
What version fixes CVE-2024-45338?
Is golang.org/x/net/html affected?
What CWE is associated with CVE-2024-45338?
How can I check Go dependencies for CVE-2024-45338?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-w32m-9786-jp63",
"modified" : "2025-03-16T17:24:07Z",
"published" : "2024-12-18T21:59:48Z",
"aliases" : [ "CVE-2024-45338" ],
"summary" : "Non-linear parsing of case-insensitive content in golang.org/x/net/html",
"details" : "An attacker can craft an input to the Parse functions that would be processed non-linearly with respect to its length, resulting in extremely slow parsing. This could cause a denial of service.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "golang.org/x/net/html"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.33.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-45338"
}, {
"type" : "WEB",
"url" : "https://github.com/golang/go/issues/70906"
}, {
"type" : "PACKAGE",
"url" : "https://cs.opensource.google/go/x/net"
}, {
"type" : "WEB",
"url" : "https://go.dev/cl/637536"
}, {
"type" : "WEB",
"url" : "https://go.dev/issue/70906"
}, {
"type" : "WEB",
"url" : "https://groups.google.com/g/golang-announce/c/wSCRmFnNmPA/m/Lvcd0mRMAwAJ"
}, {
"type" : "WEB",
"url" : "https://pkg.go.dev/vuln/GO-2024-3333"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-770" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2024-12-18T21:59:48Z",
"nvd_published_at" : "2024-12-18T21:15:08Z"
}
}