Miggo Logo

CVE-2024-41677: Qwik has a potential mXSS vulnerability due to improper HTML escaping

6.3

CVSS Score
3.1

Basic Information

EPSS Score
0.43649%
Published
8/6/2024
Updated
8/7/2024
KEV Status
No
Technology
TechnologyJavaScript

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L
Package NameEcosystemVulnerable VersionsFirst Patched Version
@builder.io/qwiknpm< 1.7.31.7.3

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from improper HTML escaping in server-side rendering. The original escapeAttr function (replaced in the fix) only handled " and &, but failed to escape < and > in attribute values. This allowed payloads like </noscript> in attributes to break out of context and execute scripts. The commit diff shows escapeAttr was replaced with a consolidated escapeHtml function that properly handles additional characters, confirming escapeAttr was the root cause.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

### Summ*ry * pot*nti*l mXSS vuln*r**ility *xists in Qwik *or v*rsions up to *.*.*. ### **t*ils Qwik improp*rly *s**p*s *TML on s*rv*r-si** r*n**rin*. It *onv*rts strin*s ***or*in* to t** *ollowin* rul*s: *ttps://*it*u*.*om/Qwik**v/qwik/*lo*/v*.*

Reasoning

T** vuln*r**ility st*ms *rom improp*r *TML *s**pin* in s*rv*r-si** r*n**rin*. T** ori*in*l `*s**p**ttr` *un*tion (r*pl**** in t** *ix) only **n*l** " *n* &, *ut **il** to *s**p* < *n* > in *ttri*ut* v*lu*s. T*is *llow** p*ylo**s lik* </nos*ript> in *