GHSA-r9vp-fp72-xgf7 silverstripe/framework's `Member.Name` is not escaped

Not scored Published

Stored XSS in SilverStripe GridField print view allows attackers to inject scripts via member names, requiring victim interaction to execute.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is GHSA-r9vp-fp72-xgf7?

GHSA-r9vp-fp72-xgf7 is a cross-site scripting vulnerability in silverstripe/framework, published on 27 May 2024. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

Official description

The core template framework/templates/Includes/GridField_print.ss uses "Printed by $Member.Name".

If the currently logged in members first name or surname contain XSS, this prints the raw HTML out, because Member->getName() just returns the raw FirstName + Surname as a string, which is injected directly.

Which versions are affected by GHSA-r9vp-fp72-xgf7?

8 open source packages ship an affected version, including silverstripe/framework.

PackageAffectedFixed in
silverstripe/framework PackagistFrom 3.1.9-rc13.1.20
silverstripe/framework PackagistFrom 3.1.9-rc13.1.20
silverstripe/framework PackagistFrom 3.2.4-rc13.2.5
silverstripe/framework PackagistFrom 3.2.4-rc13.2.5
silverstripe/framework PackagistFrom 3.3.2-rc13.3.3
silverstripe/framework PackagistFrom 3.3.2-rc13.3.3
2 more packages
silverstripe/framework PackagistFrom 3.4.0-rc13.4.1
silverstripe/framework PackagistFrom 3.4.0-rc13.4.1

How do I fix GHSA-r9vp-fp72-xgf7?

Upgrade silverstripe/framework to a fixed version for your release line: 3.1.20, 3.2.5, 3.3.3 or 3.4.1.

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-r9vp-fp72-xgf7 being exploited?

There is no known exploitation of GHSA-r9vp-fp72-xgf7 in the wild and no public exploit code.

Sources

Is GHSA-r9vp-fp72-xgf7 in your software?

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

Check your SBOMs for free