CVE-2024-9440 Slim Select 2.0 createOption "text" XSS

Medium 5.4 Published Updated

Attackers can execute arbitrary JavaScript via unsanitized input in Slim Select's createOption function, affecting applications using this library.

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-9440?

CVE-2024-9440 is a medium-severity cross-site scripting vulnerability in slimselectjs:slim_select, published on 2 Oct 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

Slim Select 2.0 versions through 2.9.0 are affected by a potential cross-site scripting vulnerability. In select.ts:createOption(), the text variable from the user-provided Options object is assigned to an innerHTML without sanitation. Software that depends on this library to dynamically generate lists using unsanitized user-provided input may be vulnerable to cross-site scripting, resulting in attacker executed JavaScript. At this time, no patch is available.

Weakness: CWE-79

Which versions are affected by CVE-2024-9440?

2 open source packages ship an affected version, including slim-select. It affects 1 product.

PackageAffectedFixed in
slim-select npmFrom 2.0.02.9.2
slim-select npmFrom 2.0.02.9.2

Products include Slimselectjs Slim Select.

How do I fix CVE-2024-9440?

Upgrade slim-select to 2.9.2 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-9440 being exploited?

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

Sources

Also known as GHSA-qvqv-mcxr-x8qw.

Is CVE-2024-9440 in your software?

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

Check your SBOMs for free