CVE-2020-26138: Silverstripe/framework FormField With Square Brackets Vulnerability
MODERATECVE-2020-26138 is a MODERATE (CVSS 5.3) formfield with square brackets vulnerability (CWE-20: Improper Input Validation) affecting Silverstripe/framework libraries in the Packagist ecosystem. The issue involves formfield with square brackets in field name skips validation. Remediation is available by upgrading affected packages to version 4.7.4.
CVE-2020-26138 at a Glance
Security Impact
CVSS: 5.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N).
How to Fix CVE-2020-26138
To remediate this vulnerability, upgrade all affected Silverstripe/framework dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade silverstripe/framework to 4.7.4
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for silverstripe/framework
How to Check if You Are Affected
To determine whether your application is affected by CVE-2020-26138, inspect your project dependencies for Silverstripe/framework:
inspect dependencies for silverstripe/framework
Analyze the terminal output to locate any version of Silverstripe/framework in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.7.4), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-20: Improper Input Validation, where the product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. In Silverstripe/framework, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2020-26138 Affected Silverstripe/framework Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
silverstripe/framework
|
Packagist |
≥ 3.0.0
< 4.7.4
|
4.7.4
|
References
Frequently Asked Questions
What is CVE-2020-26138?
Which Silverstripe/framework versions are affected?
What version fixes CVE-2020-26138?
Is silverstripe/framework affected?
What is the CVSS score of CVE-2020-26138?
What CWE is associated with CVE-2020-26138?
How can I check Packagist dependencies for CVE-2020-26138?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-7mv4-4xpg-xq44",
"modified" : "2022-03-26T00:14:34Z",
"published" : "2022-03-26T00:14:34Z",
"aliases" : [ "CVE-2020-26138" ],
"summary" : "FormField with square brackets in field name skips validation",
"details" : "FileField with array notation skips validation\n\nThe FileField class is commonly used for file upload in custom code on a Silverstripe website. This field is designed to be used with a single file upload.\n\nPHP allows for submitting multiple values by adding square brackets to the field name. When this is done to a FileField, it will be coerced into allowing multiple files by using this notation. This is not a supported feature, though nothing is done to prevent this.\n\nIn this scenario, validation such as limiting allowed extensions is not applied, and the FileField->saveInto() behaviour is not triggered. If custom controller logic is used to process the file uploads, it might implicitly rely on validation to be provided by the Form system, which is not the case.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "silverstripe/framework"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.0.0"
}, {
"fixed" : "4.7.4"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-26138"
}, {
"type" : "WEB",
"url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/silverstripe/framework/CVE-2020-26138.yaml"
}, {
"type" : "WEB",
"url" : "https://www.silverstripe.org/download/security-releases/cve-2020-26138"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-20" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2022-03-26T00:14:34Z",
"nvd_published_at" : null
}
}