CVE-2024-9440: Slim select Cross-Site Scripting Vulnerability
MODERATECVE-2024-9440 is a MODERATE (CVSS 5.4) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Slim select libraries in the npm ecosystem. The issue involves slim select has potential cross-site scripting issue. Remediation is available by upgrading affected packages to version 2.9.2.
CVE-2024-9440 at a Glance
Security Impact
CVSS: 5.4
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N).
How to Fix CVE-2024-9440
To remediate this vulnerability, upgrade all affected Slim select dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install slim-select@2.9.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls slim-select
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2024-9440, inspect your project dependencies using npm:
npm ls slim-select
Analyze the terminal output to locate any version of Slim select in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.9.2), your application is affected.
Note: The npm ls slim-select command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Slim select, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2024-9440 Affected Slim select Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
slim-select
|
npm |
≥ 2.0.0
< 2.9.2
|
2.9.2
|
References
Frequently Asked Questions
What is CVE-2024-9440?
Which Slim select versions are affected?
What version fixes CVE-2024-9440?
Is slim-select affected?
What is the CVSS score of CVE-2024-9440?
What CWE is associated with CVE-2024-9440?
How can I check npm dependencies for CVE-2024-9440?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-qvqv-mcxr-x8qw",
"modified" : "2024-10-18T15:03:40Z",
"published" : "2024-10-02T21:30:34Z",
"aliases" : [ "CVE-2024-9440" ],
"summary" : "Slim Select has potential Cross-site Scripting issue",
"details" : "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. This vulnerability is fixed in 2.9.2.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "slim-select"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.0.0"
}, {
"fixed" : "2.9.2"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-9440"
}, {
"type" : "WEB",
"url" : "https://github.com/brianvoe/slim-select/issues/564"
}, {
"type" : "WEB",
"url" : "https://github.com/brianvoe/slim-select/pull/572"
}, {
"type" : "WEB",
"url" : "https://github.com/brianvoe/slim-select/commit/f8534f27d6e9bab89024d139f1c4f7555f1efd5e"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/brianvoe/slim-select"
}, {
"type" : "WEB",
"url" : "https://github.com/brianvoe/slim-select/blob/e7e37e2ff90e125f846bd98d6b8f278524ead79e/src/slim-select/select.ts#L377"
}, {
"type" : "WEB",
"url" : "https://vulncheck.com/advisories/slim-select-xss"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-10-08T18:50:08Z",
"nvd_published_at" : "2024-10-02T19:15:15Z"
}
}