Miggo Logo

CVE-2021-32862: nbconvert vulnerable to cross-site scripting (XSS) via multiple exploit paths

5.4

CVSS Score
3.1

Basic Information

EPSS Score
0.67096%
Published
8/10/2022
Updated
1/25/2024
KEV Status
No
Technology
TechnologyPython

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
nbconvertpip< 6.5.16.5.1

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The report explicitly identifies these two functions as critical points of vulnerability. The 'from_notebook_node' method in html.py directly processes untrusted 'pygments_lexer' metadata and configures the highlighting filter. The '_pygments_highlight' function in highlight.py then uses this value to construct HTML class attributes without sanitization, leading to direct XSS injection. Other issues (e.g., template-based XSS in titles/widgets/tags) involve Jinja template rendering patterns rather than discrete functions, making them less attributable to specific code locations with high confidence.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

Most o* t** *ix*s will ** in t*is r*po, t*ou**, so **vin* it **r* *iv*s us t** priv*t* *ork to work on p*t***s **low is *urr*ntly * *upli**t* o* t** ori*in*l r*port: ---- R***iv** on s**urity@ipyt*on.or* un**it**, I'm not sur* i* w* w*nt to m*k* i

Reasoning

T** r*port *xpli*itly i**nti*i*s t**s* two *un*tions *s *riti**l points o* vuln*r**ility. T** '*rom_not**ook_no**' m*t*o* in *tml.py *ir**tly pro**ss*s untrust** 'py*m*nts_l*x*r' m*t***t* *n* *on*i*ur*s t** *i**li**tin* *ilt*r. T** '_py*m*nts_*i**li*