Miggo Logo

CVE-2022-36033:
jsoup may not sanitize code injection XSS attempts if SafeList.preserveRelativeLinks is enabled

6.1

CVSS Score

Basic Information

EPSS Score
-
Published
9/1/2022
Updated
2/2/2023
KEV Status
No
Technology
TechnologyJava

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
org.jsoup:jsoupmaven< 1.15.31.15.3

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from two key components: 1) The preserveRelativeLinks configuration in Safelist disables critical URL resolution that would normally expose malicious protocols. 2) The Cleaner's sanitization process depends on this resolution to validate protocols, creating an XSS bypass when resolution is disabled. The combination allows attacker-controlled URLs with control characters to pass through sanitization when preserveRelativeLinks is enabled, while browsers still execute them as JavaScript.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

jsoup m*y in*orr**tly s*nitiz* *TML in*lu*in* `j*v*s*ript:` URL *xpr*ssions, w*i** *oul* *llow *ross-sit* s*riptin* (XSS) *tt**ks w**n * r****r su*s*qu*ntly *li*ks t**t link. I* t** non-****ult `S***List.pr*s*rv*R*l*tiv*Links` option is *n**l**, *TML

Reasoning

T** vuln*r**ility st*ms *rom two k*y *ompon*nts: *) T** pr*s*rv*R*l*tiv*Links *on*i*ur*tion in S***list *is**l*s *riti**l URL r*solution t**t woul* norm*lly *xpos* m*li*ious proto*ols. *) T** *l**n*r's s*nitiz*tion pro**ss **p*n*s on t*is r*solution