Miggo Logo

CVE-2024-32463: Cross-site Scripting (XSS) possible due to improper sanitisation of `href` attributes on `<a>` tags

7.1

CVSS Score
3.1

Basic Information

EPSS Score
0.34385%
Published
4/17/2024
Updated
4/19/2024
KEV Status
No
Technology
TechnologyRuby

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
phlexrubygems= 1.10.01.10.1
phlexrubygems>= 1.9.0, < 1.9.21.9.2
phlexrubygems>= 1.8.0, < 1.8.31.8.3
phlexrubygems>= 1.7.0, < 1.7.21.7.2
phlexrubygems>= 1.6.0, < 1.6.31.6.3
phlexrubygems>= 1.5.0, < 1.5.31.5.3
phlexrubygems< 1.4.21.4.2

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from the attribute sanitization logic in attributes method shown in the commit diff. The patched line (-382) specifically modifies the 'href' attribute validation to first normalize the input by removing tabs/newlines before checking for 'javascript:'. The test cases added in naughty_business.rb demonstrate multiple bypass scenarios that this function previously failed to catch. This function is directly responsible for XSS protection in attribute values, making it the clear vulnerable entry point.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

### Summ*ry T**r* is * pot*nti*l *ross-sit* s*riptin* (XSS) vuln*r**ility t**t **n ** *xploit** vi* m*li*iously *r**t** us*r **t*. Our *ilt*r to **t**t *n* pr*v*nt t** us* o* t** `j*v*s*ript:` URL s***m* in t** `*r**` *ttri*ut* o* *n `<*>` t** *oul*

Reasoning

T** vuln*r**ility st*ms *rom t** *ttri*ut* s*nitiz*tion lo*i* in __*ttri*ut*s__ m*t*o* s*own in t** *ommit *i**. T** p*t**** lin* (-***) sp**i*i**lly mo*i*i*s t** '*r**' *ttri*ut* v*li**tion to *irst norm*liz* t** input *y r*movin* t**s/n*wlin*s ***o