Skip to content

GHSA-vfw5-hrgq-h5wf CVE-2018-17846 GO-2020-0014

x/net/html Vulnerable to DoS During HTML Parsing

High Go
Severity
7.5 / 10
High · CVSS 3.1
Exploit chance (EPSS)
2.51%
Chance of exploitation in the next 30 days. Higher than 84.81% of scored vulnerabilities.
Known exploited
No
Not in CISA's catalog
Weakness
CWE-835 Loop with Unreachable Exit Condition ('Infinite Loop')
Fix
0.0.0-20190125091013-d26f9f9a57f3
Upgrade golang.org/x/net to this version or later

Description

The html package (aka x/net/html) through 2018-09-25 in Go mishandles <table><math><select><mi><select></table>, leading to an infinite loop during an html.Parse call because inSelectIM and inSelectInTableIM do not comply with a specification.

Affected versions

Go

PackageVulnerableFixed in
golang.org/x/net
< 0.0.0-20190125091013-d26f9f9a57f3
0.0.0-20190125091013-d26f9f9a57f3

How to fix

Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.

golang.org/x/net Go → 0.0.0-20190125091013-d26f9f9a57f3

go
go get golang.org/x/net@v0.0.0-20190125091013-d26f9f9a57f3 && go mod tidy

Severity breakdown

CVSS 3.1 7.5

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

Weakness

CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop')

The product contains an iteration or loop with an exit condition that cannot be reached, i.e., an infinite loop.

References

Timeline

  1. Published
  2. Last updated by the source
  3. Latest EPSS score
AdvisorySeverityWhy it's related
GHSA-4374-p667-p6c8
HTTP/2 rapid reset can cause excessive work in net/http
High Known exploited Also affects golang.org/x/net
GHSA-qppj-fm5r-hxr3
HTTP/2 Stream Cancellation Attack
Medium Known exploited Also affects golang.org/x/net
GO-2026-6866
Check all ancestor namespace transitions when rendering raw text in html in golang.org/x/net
Not rated yet Also affects golang.org/x/net
GO-2026-6860
Avoid quadratic complexity when coalescing text nodes in html in golang.org/x/net
Not rated yet Also affects golang.org/x/net
GO-2026-6617
HTTP/2 server crash due to HPACK encoder race in net/http
High Also affects golang.org/x/net
GO-2026-6612
Double flow control refund on HTTP/2 server streams in net/http
Critical Also affects golang.org/x/net
GO-2026-6611
Excessive CPU consumption from repeated initial window changes in net/http
High Also affects golang.org/x/net
GO-2026-6610
HTTP/2 transport accepts malformed framing-related headers in net/http
High Also affects golang.org/x/net

Credits: @tr3ee

Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor