Miggo Logo

CVE-2024-53261: @sveltejs/kit vulnerable to XSS on dev mode 404 page

2

CVSS Score
4.0

Basic Information

EPSS Score
0.34577%
Published
11/25/2024
Updated
1/22/2025
KEV Status
No
Technology
TechnologyJavaScript

Technical Details

CVSS Vector
CVSS:4.0/AV:N/AC:H/AT:P/PR:L/UI:A/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Package NameEcosystemVulnerable VersionsFirst Patched Version
@sveltejs/kitnpm< 2.8.32.8.3

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from unsanitized URL input being rendered in the dev mode 404 page. The commit diff shows the fix added escape_html() calls specifically in the not_found function within utils.js, which handles 404 responses. Prior to the patch, this function directly interpolated URL-derived values (base and prefixed) into HTML without proper escaping. The Snyk analysis confirms tainted data flows from request handling to this rendering function. The high confidence comes from the direct correlation between the vulnerability description, commit fixes, and the function's role in constructing HTML responses with user-controlled input.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

### Summ*ry "Uns*nitiz** input *rom *t** r*qu*st URL* *lows into `*n*`, w**r* it is us** to r*n**r *n *TML p*** r*turn** to t** us*r. T*is m*y r*sult in * *ross-Sit* S*riptin* *tt**k (XSS)." ### **t*ils Sour** o* pot*nti*lly t*int** **t* is in `p*

Reasoning

T** vuln*r**ility st*ms *rom uns*nitiz** URL input **in* r*n**r** in t** **v mo** *** p***. T** *ommit *i** s*ows t** *ix ***** *s**p*_*tml() **lls sp**i*i**lly in t** not_*oun* *un*tion wit*in utils.js, w*i** **n*l*s *** r*spons*s. Prior to t** p*t*