Miggo Logo

CVE-2022-23519: Possible XSS vulnerability with certain configurations of rails-html-sanitizer

6.1

CVSS Score
3.1

Basic Information

EPSS Score
0.3496%
Published
12/13/2022
Updated
2/13/2025
KEV Status
No
Technology
TechnologyRuby

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
rails-html-sanitizerrubygems< 1.4.41.4.4

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability manifests when specific tag combinations (math+style or svg+style) are allowed through four configuration mechanisms. Three functions are directly involved: 1) The sanitize() helper method with tags parameter, 2) The class-level allowed_tags setter, and 3) The SafeListSanitizer.sanitize() method with tags parameter. These functions become vulnerable vectors when misconfigured because they permit dangerous element combinations that bypass proper sanitization. The advisory explicitly identifies these as the impacted code paths, making confidence high.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

## Summ*ry T**r* is * possi*l* XSS vuln*r**ility wit* **rt*in *on*i*ur*tions o* R*ils::*tml::S*nitiz*r. - V*rsions *****t**: *LL - Not *****t**: NON* - *ix** v*rsions: *.*.* ## Imp**t * possi*l* XSS vuln*r**ility wit* **rt*in *on*i*ur*tions o* R

Reasoning

T** vuln*r**ility m*ni**sts w**n sp**i*i* t** *om*in*tions (m*t*+styl* or sv*+styl*) *r* *llow** t*rou** *our *on*i*ur*tion m****nisms. T*r** *un*tions *r* *ir**tly involv**: *) T** `s*nitiz*()` **lp*r m*t*o* wit* t**s p*r*m*t*r, *) T** *l*ss-l*v*l `