VDB
Sign up
MEDIUM6.1

GHSA-97jm-g33h-f46g

silverstripe/framework ReadOnly transformation for formfields exploitable

Quick fix

GHSA-97jm-g33h-f46g — silverstripe/framework: upgrade to the fixed version with the command below.

composer require silverstripe/framework:^3.1.21

Details

Form fields returning isReadonly() as true are vulnerable to reflected XSS injections. This includes ReadonlyField, LookupField, HTMLReadonlyField, as well as special purpose fields like TimeField_Readonly. Values submitted to through these form fields are not filtered out from the form session data, and might be shown to the user depending on the form behaviour. For example, form validation errors cause the form to re-render with previously submitted values by default.

SilverStripe forms automatically load values from request data (GET and POST), which enables malicious use of URLs if your form uses these fields and doesn't overwrite data on form construction.

Readonly and disabled form fields are already filtered out in Form->saveInto(), so maliciously submitted data on these fields doesn't make it into the database unless you are accessing form values directly in your saving logic.

Are you affected?

Enter the version of the package you're using.

Affected packages

Packagist/silverstripe/framework
Introduced in: 0Fixed in: 3.1.21
Fixcomposer require silverstripe/framework:^3.1.21
Packagist/silverstripe/framework
Introduced in: 3.2.0Fixed in: 3.2.6
Fixcomposer require silverstripe/framework:^3.2.6
Packagist/silverstripe/framework
Introduced in: 3.3.0Fixed in: 3.3.4
Fixcomposer require silverstripe/framework:^3.3.4
Packagist/silverstripe/framework
Introduced in: 3.4.0Fixed in: 3.4.2
Fixcomposer require silverstripe/framework:^3.4.2

References

Check it before you install it

One call answers whether to add this package: known advisories, CISA KEV, and whether the name is a hallucinated or freshly squatted one. No key needed to try it.

curl -s https://vdb.ai.kr/v1/ai/check-packages \
  -H 'Content-Type: application/json' \
  -d '{"packages":["pkg:composer/silverstripe/framework"]}'