CVE-2021-43836: Sulu/sulu PHP File Inclusion Vulnerability
HIGHCVE-2021-43836 is a HIGH (CVSS 8.5) php file inclusion vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Sulu/sulu libraries in the Packagist ecosystem. The issue involves php file inclusion in the sulu admin panel. Remediation is available by upgrading affected packages to version 1.6.44, 2.2.18, 2.3.8, 2.4.0.
CVE-2021-43836 at a Glance
Security Impact
CVSS: 8.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H).
How to Fix CVE-2021-43836
To remediate this vulnerability, upgrade all affected Sulu/sulu 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 sulu/sulu to 1.6.44
Upgrade sulu/sulu to 2.2.18
Upgrade sulu/sulu to 2.3.8
Upgrade sulu/sulu to 2.4.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for sulu/sulu
How to Check if You Are Affected
To determine whether your application is affected by CVE-2021-43836, inspect your project dependencies for Sulu/sulu:
inspect dependencies for sulu/sulu
Analyze the terminal output to locate any version of Sulu/sulu in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.6.44), 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-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. In Sulu/sulu, 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-43836 Affected Sulu/sulu Versions
4 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
sulu/sulu
|
Packagist |
< 1.6.44
|
1.6.44
|
|
sulu/sulu
|
Packagist |
≥ 2.0.0
< 2.2.18
|
2.2.18
|
|
sulu/sulu
|
Packagist |
≥ 2.3.0
< 2.3.8
|
2.3.8
|
|
sulu/sulu
|
Packagist |
≥ 2.4.0-RC1
< 2.4.0
All 1 versions
2.4.0-RC1
|
2.4.0
|
References
Frequently Asked Questions
What is CVE-2021-43836?
Which Sulu/sulu versions are affected?
What version fixes CVE-2021-43836?
Is sulu/sulu affected?
What is the CVSS score of CVE-2021-43836?
What CWE is associated with CVE-2021-43836?
How can I check Packagist dependencies for CVE-2021-43836?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-vx6j-pjrh-vgjh",
"modified" : "2021-12-15T22:27:31Z",
"published" : "2021-12-15T22:54:20Z",
"aliases" : [ "CVE-2021-43836" ],
"summary" : "PHP file inclusion in the Sulu admin panel",
"details" : "### Impact\n_What kind of vulnerability is it? Who is impacted?_\n\nAn attacker can read arbitrary local files via a PHP file include. In a default configuration this also leads to remote code execution.\n\n* Compromised components: Arbitrary file read on the server, (Potential) Remote code execution\n* Exploitation pre-requisite: User account on the backend\n\n### Patches\n\n_Has the problem been patched? What versions should users upgrade to?_\n\nThe problem is patched with the Versions 1.6.44, 2.2.18, 2.3.8, 2.4.0\n\n### Workarounds\n\n_Is there a way for users to fix or remediate the vulnerability without upgrading?_\n\nOverwrite the service `sulu_route.generator.expression_token_provider` and wrap the translator before passing it to the expression language. \n\n### References\n\n_Are there any links users can visit to find out more?_\n\nCurrently not.\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [example link to repo](http://example.com)\n* Email us at [example email address](mailto:example@example.com)\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "sulu/sulu"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.6.44"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "sulu/sulu"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.0.0"
}, {
"fixed" : "2.2.18"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "sulu/sulu"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.3.0"
}, {
"fixed" : "2.3.8"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "sulu/sulu"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.4.0-RC1"
}, {
"fixed" : "2.4.0"
} ]
} ],
"versions" : [ "2.4.0-RC1" ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/sulu/sulu/security/advisories/GHSA-vx6j-pjrh-vgjh"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-43836"
}, {
"type" : "WEB",
"url" : "https://github.com/sulu/sulu/commit/9c948f9ce350c68b53af8c3910e2cefc7f722b54"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/sulu/sulu"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2021-12-15T22:27:31Z",
"nvd_published_at" : "2021-12-15T20:15:00Z"
}
}