CVE-2018-17142
Description
The html package (aka x/net/html) through 2018-09-17 in Go mishandles , leading to a "panic: runtime error" in parseCurrentToken in parse.go during an html.Parse call.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Go x/net/html panics on malformed input, enabling denial of service.
Vulnerability
The html package in golang.org/x/net (through 2018-09-17) mishandles a specific sequence of HTML tags: `. When this input is parsed by html.Parse, a nil pointer dereference occurs in parseCurrentToken in parse.go, causing a panic [1][3]. The issue affects all versions of x/net/html` up to the commit dated 2018-09-17 [2].
Exploitation
An attacker needs only the ability to supply crafted HTML content to an application that calls html.Parse on user-controllable input. No authentication or special privileges are required. The attack is trivially executed by sending an HTTP request or uploading a file containing the malformed tag sequence [3]. The panic completely terminates the Go program, resulting in a denial of service.
Impact
Successful exploitation causes a runtime panic, crashing the Go process. This leads to a denial of service (DoS) with no information disclosure or privilege escalation. The impact is limited to availability [1][2].
Mitigation
As of the vulnerability publication date (2018-09-17), no patched version of x/net is available [1]. The issue was reported in GitHub issue #27702 [3]. Developers should either avoid parsing untrusted HTML with the affected package or implement a recover() mechanism to handle panics gracefully. Later versions of Go and x/net may include a fix; users are advised to upgrade to the latest release [2].
AI Insight generated on May 22, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
golang.org/x/netGo | < 0.0.0-20180925071336-cf3bd585ca2a | 0.0.0-20180925071336-cf3bd585ca2a |
Affected products
1Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
11- github.com/advisories/GHSA-2wp2-chmh-r934ghsaADVISORY
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/LREEWY6KNLHRWFZ7OT4HVLMVVCGGUHON/mitrevendor-advisoryx_refsource_FEDORA
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/UKRCI7WIOCOCD3H7NXWRGIRABTQOZOBK/mitrevendor-advisoryx_refsource_FEDORA
- nvd.nist.gov/vuln/detail/CVE-2018-17142ghsaADVISORY
- github.com/golang/go/issues/27702ghsax_refsource_MISCWEB
- go.dev/cl/136875ghsaWEB
- go.dev/issue/27702ghsaWEB
- go.googlesource.com/net/+/cf3bd585ca2a5a21b057abd8be7eea2204af89d0ghsaWEB
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/LREEWY6KNLHRWFZ7OT4HVLMVVCGGUHONghsaWEB
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/UKRCI7WIOCOCD3H7NXWRGIRABTQOZOBKghsaWEB
- pkg.go.dev/vuln/GO-2022-0192ghsaWEB
News mentions
0No linked articles in our index yet.