CVE-2021-22968: Concrete5/core Improper File Handling Vulnerability
HIGHCVE-2021-22968 is a HIGH (CVSS 7.2) improper file handling vulnerability (CWE-98: Improper Control of Filename for Include/Require Statement in PHP Program ('PHP Remote File Inclusion')) affecting Concrete5/core libraries in the Packagist ecosystem. The issue involves improper file handling in concrete5/core. Remediation is available by upgrading affected packages to version 8.5.7.
CVE-2021-22968 at a Glance
Security Impact
CVSS: 7.2
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2021-22968
To remediate this vulnerability, upgrade all affected Concrete5/core 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 concrete5/core to 8.5.7
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for concrete5/core
How to Check if You Are Affected
To determine whether your application is affected by CVE-2021-22968, inspect your project dependencies for Concrete5/core:
inspect dependencies for concrete5/core
Analyze the terminal output to locate any version of Concrete5/core in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 8.5.7), 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-98: Improper Control of Filename for Include/Require Statement in PHP Program ('PHP Remote File Inclusion'), where the php application receives input from an upstream component, but it does not restrict or incorrectly restricts the input before its usage in "require," "include," or similar functions. In Concrete5/core, 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-2021-22968 Affected Concrete5/core Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
concrete5/core
|
Packagist |
< 8.5.7
|
8.5.7
|
References
Frequently Asked Questions
What is CVE-2021-22968?
Which Concrete5/core versions are affected?
What version fixes CVE-2021-22968?
Is concrete5/core affected?
What is the CVSS score of CVE-2021-22968?
What CWE is associated with CVE-2021-22968?
How can I check Packagist dependencies for CVE-2021-22968?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-g3p2-hfqr-9m25",
"modified" : "2023-06-30T20:31:40Z",
"published" : "2021-11-23T17:54:26Z",
"aliases" : [ "CVE-2021-22968" ],
"summary" : "Improper file handling in concrete5/core",
"details" : "A bypass of adding remote files in Concrete CMS (previously concrete5) File Manager leads to remote code execution in Concrete CMS (concrete5) versions 8.5.6 and below. The external file upload feature stages files in the public directory even if they have disallowed file extensions. They are stored in a directory with a random name, but it's possible to stall the uploads and brute force the directory name. You have to be an admin with the ability to upload files, but this bug gives you the ability to upload restricted file types and execute them depending on server configuration. To fix this, a check for allowed file extensions was added before downloading files to a tmp directory",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "concrete5/core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "8.5.7"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-22968"
}, {
"type" : "WEB",
"url" : "https://hackerone.com/reports/1350444"
}, {
"type" : "WEB",
"url" : "https://documentation.concretecms.org/developers/introduction/version-history/857-release-notes"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/olsgreen/concrete5-core"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-330", "CWE-98" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2021-11-22T19:41:50Z",
"nvd_published_at" : "2021-11-19T19:15:00Z"
}
}