Statamic CMS's unsafe method invocation via collection sorting allows data destruction
As published by the sources
Affected packages
- Affected
<5.73.23 || >=6.0.0,<6.20.0Fixed in5.73.236.20.0
Derived from the fixed versions above
What to do
Upgrade statamic/cms to the fixed version in your release line: 5.73.23, 6.20.0.
composer update statamic/cms --with-dependencies
To see which version you have installed, run composer show vendor/package. Running composer audit lists the known advisories that match your installed versions.
Quoted from the original advisory
Details
Impact
The fix for GHSA-4jjr-vmv7-wh4w was incomplete. It addressed the issue in the query builder, but the same protection was not applied to in-memory collection sorting. Manipulating sort parameters could result in the loss of content and assets.
This requires a front-end template that passes request input into a tag's sort parameter. It is not exploitable by default — a template would need to be explicitly set up to sort by a visitor-controlled value.
Patches
This has been fixed in 5.73.23 and 6.20.0.