GHSA-cfxh-frx4-9gjg Cross-site Scripting in @spscommerce/ds-react

Not scored Published

Cross-site scripting vulnerability in SPS Commerce React UI library allows attackers to execute scripts via user-controlled options.

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 GHSA-cfxh-frx4-9gjg?

GHSA-cfxh-frx4-9gjg is a cross-site scripting vulnerability in @spscommerce/ds-react, published on 15 Dec 2023. 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

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

Which versions are affected by GHSA-cfxh-frx4-9gjg?

2 open source packages ship an affected version, including @spscommerce/ds-react.

PackageAffectedFixed in
@spscommerce/ds-react npmFrom 4.12.27.17.4
@spscommerce/ds-react npmFrom 4.12.27.17.4

How do I fix GHSA-cfxh-frx4-9gjg?

Upgrade @spscommerce/ds-react to 7.17.4 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 GHSA-cfxh-frx4-9gjg being exploited?

There is no known exploitation of GHSA-cfxh-frx4-9gjg in the wild and no public exploit code.

Sources

Is GHSA-cfxh-frx4-9gjg in your software?

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

Check your SBOMs for free