GitHub Advisoryadvisory · Packagist
GHSA-97jm-g33h-f46g silverstripe/framework ReadOnly transformation for formfields exploitable
MEDIUM
Official page ↗
- Ecosystem
- Packagist
- Packages
- silverstripe/framework
- Severity
- Moderate
- CVSS vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- Weaknesses
- CWE-79
- Reviewed
- 2024-05-23
Affected packages
• Packagist silverstripe/framework: < 3.1.21 → fixed in 3.1.21
• Packagist silverstripe/framework: >= 3.2.0, < 3.2.6 → fixed in 3.2.6
• Packagist silverstripe/framework: >= 3.3.0, < 3.3.4 → fixed in 3.3.4
• Packagist silverstripe/framework: >= 3.4.0, < 3.4.2 → fixed in 3.4.2
Description
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.
Related
Weakness · CWE (1)
- CWE-79 Improper Neutralization of Input During Web Page Generation weakness
References
- https://github.com/silverstripe/silverstripe-framework/commit/8336cb96b9600dacafa8a525c92662345b52cfae web
- https://github.com/FriendsOfPHP/security-advisories/blob/master/silverstripe/framework/SS-2016-010-1.yaml web
- https://github.com/silverstripe/silverstripe-framework package
- https://www.silverstripe.org/download/security-releases/ss-2016-010 web