CVE-2024-41677 Cross-site Scripting (XSS) vulnerability due to improper HTML escaping in qwik

Medium 6.3 Published Updated

Attackers can execute arbitrary scripts via mutation XSS due to improper HTML escaping during server-side rendering in the Qwik framework.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2024-41677?

CVE-2024-41677 is a medium-severity cross-site scripting vulnerability in QwikDev qwik, published on 6 Aug 2024. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

Qwik is a performance focused javascript framework. A potential mutation XSS vulnerability exists in Qwik for versions up to but not including 1.6.0. Qwik improperly escapes HTML on server-side rendering. It converts strings according to the rules found in the `render-ssr.ts` file. It sometimes causes the situation that the final DOM tree rendered on browsers is different from what Qwik expects on server-side rendering. This may be leveraged to perform XSS attacks, and a type of the XSS is known as mXSS (mutation XSS). This has been resolved in qwik version 1.6.0 and @builder.io/qwik version 1.7.3. All users are advised to upgrade. There are no known workarounds for this vulnerability.

Weakness: CWE-79

Which versions are affected by CVE-2024-41677?

2 open source packages ship an affected version, including @builder.io/qwik. It affects 1 product.

PackageAffectedFixed in
@builder.io/qwik npmAll versions1.7.3
@builder.io/qwik npmAll versions1.7.3

Products include Qwik Qwik.

How do I fix CVE-2024-41677?

Upgrade @builder.io/qwik to 1.7.3 or later.

Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.

Is CVE-2024-41677 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-41677 exists.

Sources

Also known as GHSA-2rwj-7xq8-4gx4.

Is CVE-2024-41677 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free