MediumGHSA-34q6-xqxh-gq39

Silverstripe XSS In rewritten hash links

Published 23 May 2024 · Updated 28 Nov 2024

Affected packages

Affected
<3.0.13
Fixed in
3.0.13
Update to the fixed version for your release line, for example:composer require silverstripe/framework:^3.0.13
Affected
>=3.1.0 <3.1.12
Fixed in
3.1.12
Update to the fixed version for your release line, for example:composer require silverstripe/framework:^3.1.12

Details

A high level XSS vulnerability has been discovered in the SilverStripe framework which causes links containing hash anchors (E.g. href="#anchor") to be rewritten in an unsafe way.

The rewriteHashlinks option on SSViewer will rewrite these to contain the current url, although without adequate escaping, meaning that HTML could be injected via injecting unsafe values to any page via the querystring.

Due to the nature of this issue it is likely that a large number of SilverStripe sites are affected.

Is GHSA-34q6-xqxh-gq39 in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected silverstripe/framework, and gives you the command that fixes it.

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.