CVE-2018-17142: Golang.org/x/net Golang.org/x/net/html NULL Pointer Dereference Vulnerability Vulnerability
HIGHCVE-2018-17142 is a HIGH (CVSS 7.5) golang.org/x/net/html null pointer dereference vulnerability vulnerability (CWE-476: NULL Pointer Dereference) affecting Golang.org/x/net libraries in the Go ecosystem. The issue involves golang.org/x/net/html null pointer dereference vulnerability. Remediation is available by upgrading affected packages to version 0.0.0-20180925071336-cf3bd585ca2a.
CVE-2018-17142 at a Glance
Security Impact
CVSS: 7.5
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:H).
How to Fix CVE-2018-17142
To remediate this vulnerability, upgrade all affected Golang.org/x/net 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 to 0.0.0-20180925071336-cf3bd585ca2a
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
How to Check if You Are Affected
To determine whether your application is affected by CVE-2018-17142, inspect your project dependencies for Golang.org/x/net:
inspect dependencies for golang.org/x/net
Analyze the terminal output to locate any version of Golang.org/x/net in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.0.0-20180925071336-cf3bd585ca2a), 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-476: NULL Pointer Dereference, where the product dereferences a pointer that it expects to be valid but is null. In Golang.org/x/net, 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-2018-17142 Affected Golang.org/x/net Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
golang.org/x/net
|
Go |
< 0.0.0-20180925071336-cf3bd585ca2a
|
0.0.0-20180925071336-cf3bd585ca2a
|
References
Frequently Asked Questions
What is CVE-2018-17142?
Which Golang.org/x/net versions are affected?
What version fixes CVE-2018-17142?
Is golang.org/x/net affected?
What is the CVSS score of CVE-2018-17142?
What CWE is associated with CVE-2018-17142?
How can I check Go dependencies for CVE-2018-17142?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-2wp2-chmh-r934",
"modified" : "2024-05-20T20:48:29Z",
"published" : "2022-05-13T01:19:23Z",
"aliases" : [ "CVE-2018-17142" ],
"summary" : "golang.org/x/net/html NULL Pointer Dereference vulnerability",
"details" : "The html package (aka x/net/html) through 2018-09-17 in Go mishandles <math><template><mo><template>, leading to a \"panic: runtime error\" in parseCurrentToken in parse.go during an html.Parse call",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "golang.org/x/net"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.0.0-20180925071336-cf3bd585ca2a"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2018-17142"
}, {
"type" : "WEB",
"url" : "https://github.com/golang/go/issues/27702"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/golang/go"
}, {
"type" : "WEB",
"url" : "https://go.dev/cl/136875"
}, {
"type" : "WEB",
"url" : "https://go.dev/issue/27702"
}, {
"type" : "WEB",
"url" : "https://go.googlesource.com/net/+/cf3bd585ca2a5a21b057abd8be7eea2204af89d0"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/LREEWY6KNLHRWFZ7OT4HVLMVVCGGUHON"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/UKRCI7WIOCOCD3H7NXWRGIRABTQOZOBK"
}, {
"type" : "WEB",
"url" : "https://pkg.go.dev/vuln/GO-2022-0192"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-476" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2023-02-08T00:36:12Z",
"nvd_published_at" : "2018-09-17T14:29:00Z"
}
}