GHSA-cfxh-frx4-9gjg: @spscommerce/ds react Remote Code Execution Vulnerability

CRITICAL
CWE-79
Published
Advisory Summary

GHSA-cfxh-frx4-9gjg is a CRITICAL remote code execution vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting @spscommerce/ds react libraries in the npm ecosystem. The issue involves cross-site scripting in @spscommerce/ds-react. Remediation is available by upgrading affected packages to version 7.17.4.

GHSA-cfxh-frx4-9gjg at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-cfxh-frx4-9gjg
Severity CRITICAL
CVSS v3.1 Base Score N/A
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product @spscommerce/ds react
Package Ecosystem npm
Published Date
Last Updated

How to Fix GHSA-cfxh-frx4-9gjg

To remediate this vulnerability, upgrade all affected @spscommerce/ds react dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

@spscommerce/ds-react fixed: 7.17.4
npm install @spscommerce/ds-react@7.17.4
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 @spscommerce/ds-react

How to Check if You Are Affected

To determine whether your Node.js application is affected by GHSA-cfxh-frx4-9gjg, inspect your project dependencies using npm:

npm ls @spscommerce/ds-react

Analyze the terminal output to locate any version of @spscommerce/ds react in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 7.17.4), your application is affected.

Note: The npm ls @spscommerce/ds-react 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 @spscommerce/ds react, 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

### Impact XSS, anyone using the SPS Select with options prop populated from user input is impacted. If these options are stored, then it could have been a stored XSS. ### Patches The code has been patched for version 7 of woodland. Users should upgrade to 7.17.4 or higher ### Workarounds This is not recommended. If you are not upgrading then you would need to sanitize your options yourself (including those currently stored in databases). This is not recommended. ### References https://github.com/SPSCommerce/woodland/blob/c49e999f97f3c0b56502859f4de1e8c6666dd74d/packages/ds-react/src/option-list/SpsOptionList.tsx#L559

GHSA-cfxh-frx4-9gjg Affected @spscommerce/ds react Versions

1 component(s)
Fixed Versions:
7.17.4
Product / Package Ecosystem Affected Versions Fixed Version
@spscommerce/ds-react
npm
≥ 4.12.2
< 7.17.4
7.17.4

References

Frequently Asked Questions

What is GHSA-cfxh-frx4-9gjg?
GHSA-cfxh-frx4-9gjg is a security vulnerability in @spscommerce/ds react involving Cross-site Scripting in @spscommerce/ds-react under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which @spscommerce/ds react versions are affected?
Affected versions include releases prior to 7.17.4 across affected packages: @spscommerce/ds-react.
What version fixes GHSA-cfxh-frx4-9gjg?
Upgrading to 7.17.4 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @spscommerce/ds-react affected?
Yes, @spscommerce/ds-react is affected in releases prior to 7.17.4. Upgrade your dependency to 7.17.4 or later.
What CWE is associated with GHSA-cfxh-frx4-9gjg?
GHSA-cfxh-frx4-9gjg 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 GHSA-cfxh-frx4-9gjg?
Run the dependency tree command: 'npm ls @spscommerce/ds-react'. 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-cfxh-frx4-9gjg",
  "modified" : "2023-12-15T03:13:18Z",
  "published" : "2023-12-15T03:13:18Z",
  "aliases" : [ ],
  "summary" : "Cross-site Scripting in @spscommerce/ds-react",
  "details" : "### Impact\nXSS, anyone using the SPS Select with options prop populated from user input is impacted. If these options are stored, then it could have been a stored XSS. \n\n### Patches\nThe code has been patched for version 7 of woodland. Users should upgrade to 7.17.4 or higher\n\n### Workarounds\nThis is not recommended. If you are not upgrading then you would need to sanitize your options yourself (including those currently stored in databases). This is not recommended.\n\n### References\nhttps://github.com/SPSCommerce/woodland/blob/c49e999f97f3c0b56502859f4de1e8c6666dd74d/packages/ds-react/src/option-list/SpsOptionList.tsx#L559\n",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@spscommerce/ds-react"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.12.2"
      }, {
        "fixed" : "7.17.4"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/SPSCommerce/woodland/security/advisories/GHSA-cfxh-frx4-9gjg"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/SPSCommerce/woodland"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-12-15T03:13:18Z",
    "nvd_published_at" : null
  }
}