CVE-2024-23841 XSS in @apollo/experimental-nextjs-app-support

High 8.2 Published Updated

An attacker can execute arbitrary scripts in the victim's browser via malicious input in Apollo Client for Next.js.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2024-23841?

CVE-2024-23841 is a high-severity cross-site scripting vulnerability in apollographql apollo-client-nextjs, published on 30 Jan 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

apollo-client-nextjs is the Apollo Client support for the Next.js App Router. The @apollo/experimental-apollo-client-nextjs NPM package is vulnerable to a cross-site scripting vulnerability. To exploit this vulnerability, an attacker would need to either inject malicious input (e.g. by redirecting a user to a specifically-crafted link) or arrange to have malicious input be returned by a GraphQL server (e.g. by persisting it in a database). To fix this issue, please update to version 0.7.0 or later.

Weakness: CWE-80

Which versions are affected by CVE-2024-23841?

2 open source packages ship an affected version, including @apollo/experimental-nextjs-app-support. It affects 1 product.

PackageAffectedFixed in
@apollo/experimental-nextjs-app-support npmAll versions0.7.0
@apollo/experimental-nextjs-app-support npmAll versions0.7.0

Products include Apollographql Apollo Client.

How do I fix CVE-2024-23841?

Upgrade @apollo/experimental-nextjs-app-support to 0.7.0 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-23841 being exploited?

There is no known exploitation of CVE-2024-23841 in the wild and no public exploit code.

Sources

Also known as GHSA-rv8p-rr2h-fgpg.

Is CVE-2024-23841 in your software?

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

Check your SBOMs for free