Vulnerabilities in pkg:npm/slim-select

PACKAGE
Advisory Identifier: GHSA-qvqv-mcxr-x8qw
Advisory Summary

CVE-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.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/slim-select

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/slim-select. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-qvqv-mcxr-x8qw CVE-2024-9440 MODERATE Slim Select has potential Cross-site Scripting issue

CVE-2024-9440 at a Glance

CVE Identifier CVE-2024-9440
GHSA Identifier GHSA-qvqv-mcxr-x8qw
Severity MODERATE
CVSS v3.1 Base Score 5.4
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product Slim select
Package Ecosystem npm
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability None (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.

slim-select fixed: 2.9.2
npm install slim-select@2.9.2
Verify Direct and Transitive Dependencies

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

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.

CVE-2024-9440 Affected Slim select Versions

1 component(s)
Fixed Versions:
2.9.2
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?
CVE-2024-9440 is a security vulnerability in Slim select involving Slim Select has potential Cross-site Scripting issue under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which Slim select versions are affected?
Affected versions include releases prior to 2.9.2 across affected packages: slim-select.
What version fixes CVE-2024-9440?
Upgrading to 2.9.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is slim-select affected?
Yes, slim-select is affected in releases prior to 2.9.2. Upgrade your dependency to 2.9.2 or later.
What is the CVSS score of CVE-2024-9440?
CVE-2024-9440 has a CVSS v3.1 base score of 5.4 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N.
What CWE is associated with CVE-2024-9440?
CVE-2024-9440 is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (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.).
How can I check npm dependencies for CVE-2024-9440?
Run the dependency tree command: 'npm ls slim-select'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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"
  }
}