CVE-2020-26138: FormField with square brackets in field name skips validation
5.3
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.52242%
CWE
Published
3/26/2022
Updated
2/7/2024
KEV Status
No
Technology
PHP
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
silverstripe/framework | composer | >= 3.0.0, < 4.7.4 | 4.7.4 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from two key points: 1) FileField's
saveInto()
method isn't designed to handle array-style PHP
file uploads, and 2) Form validation skips fields with square bracket notation. The combination allows attackers to submit multiple files through a field designed for single files, bypassing extension validation. The FileField::saveInto
method is explicitly mentioned as not being triggered in this scenario, and the Form validation system's failure to handle array-style field names is demonstrated in the example where $data['MyUnsafeField']
remains unvalidated. These components directly relate to the described vulnerability mechanisms.