Miggo Logo

CVE-2018-17848: golang.org/x/net/html Improper Validation of Array Index vulnerability

7.5

CVSS Score
3.1

Basic Information

EPSS Score
0.76531%
Published
5/13/2022
Updated
5/20/2024
KEV Status
No
Technology
TechnologyGo

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
golang.org/x/netgo< 0.0.0-20190125002852-4b62a64f59f70.0.0-20190125002852-4b62a64f59f7

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability manifests in stack pop operations during HTML parsing. Both stack implementations (insertionModeStack and nodeStack) show panic traces in the provided crash reports. The core issue is lack of length validation before stack manipulation, which would appear in profiling as repeated calls to these pop methods followed by panic. The CVE description explicitly calls out insertionModeStack.pop, while the GitHub issue demonstrates nodeStack.pop failures with different HTML inputs.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

T** *tml p**k*** (*k* `x/n*t/*tml`) t*rou** ****-**-** in *o mis**n*l*s <m*t*><t*mpl*t*><mn><*></t*mpl*t*>, l***in* to * "p*ni*: runtim* *rror" (in**x out o* r*n**) in (*ins*rtionMo**St**k).pop in no**.*o, **ll** *rom in****IM, *urin* *n *tml.P*rs* *

Reasoning

T** vuln*r**ility m*ni**sts in st**k pop op*r*tions *urin* *TML p*rsin*. *ot* st**k impl*m*nt*tions (ins*rtionMo**St**k *n* no**St**k) s*ow p*ni* tr***s in t** provi*** *r*s* r*ports. T** *or* issu* is l**k o* l*n*t* v*li**tion ***or* st**k m*nipul*t