CVE-2022-41951: Oro/platform Path Traversal Vulnerability
HIGHCVE-2022-41951 is a HIGH (CVSS 8.5) path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Oro/platform libraries in the Packagist ecosystem. The issue involves oroplatform vulnerable to path traversal during temporary file manipulations. Remediation is available by upgrading affected packages to version 5.0.8.
CVE-2022-41951 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-2022-41951
To remediate this vulnerability, upgrade all affected Oro/platform 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 oro/platform to Latest secure release
Upgrade oro/platform to Latest secure release
Upgrade oro/platform to 5.0.8
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for oro/platform
How to Check if You Are Affected
To determine whether your application is affected by CVE-2022-41951, inspect your project dependencies for Oro/platform:
inspect dependencies for oro/platform
Analyze the terminal output to locate any version of Oro/platform in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.0.8), 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 Oro/platform, 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-2022-41951 Affected Oro/platform Versions
3 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
oro/platform
|
Packagist |
≥ 4.1.0
≤ 4.1.13
|
|
|
oro/platform
|
Packagist |
≥ 4.2.0
≤ 4.2.10
|
|
|
oro/platform
|
Packagist |
≥ 5.0.0
< 5.0.8
|
5.0.8
|
References
Frequently Asked Questions
What is CVE-2022-41951?
Which Oro/platform versions are affected?
What version fixes CVE-2022-41951?
Is oro/platform affected?
What is the CVSS score of CVE-2022-41951?
What CWE is associated with CVE-2022-41951?
How can I check Packagist dependencies for CVE-2022-41951?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-9v3j-4j64-p937",
"modified" : "2023-11-27T23:28:52Z",
"published" : "2023-11-27T23:28:52Z",
"aliases" : [ "CVE-2022-41951" ],
"summary" : "OroPlatform vulnerable to path traversal during temporary file manipulations",
"details" : "### Impact\nPath Traversal is possible in `Oro\\Bundle\\GaufretteBundle\\FileManager::getTemporaryFileName`. \nWith this method, an attacker can pass the path to a non-existent file, which will allow writing the content to a new file that will be available during script execution. The file will be deleted immediately after the script ends. \n\n### Workarounds\nApply patch\n```patch\n--- a/vendor/oro/platform/src/Oro/Bundle/GaufretteBundle/FileManager.php\n+++ b/vendor/oro/platform/src/Oro/Bundle/GaufretteBundle/FileManager.php\n@@ -614,6 +614,10 @@\n */\n public function getTemporaryFileName(string $suggestedFileName = null): string\n {\n+ if ($suggestedFileName) {\n+ $suggestedFileName = basename($suggestedFileName);\n+ }\n+\n $tmpDir = ini_get('upload_tmp_dir');\n if (!$tmpDir || !is_dir($tmpDir) || !is_writable($tmpDir)) {\n $tmpDir = sys_get_temp_dir();\n\n```\n\nOr decorate `Oro\\Bundle\\GaufretteBundle\\FileManager::getTemporaryFileName` in your customization and clear `$suggestedFileName` argument\n\n```php\n public function getTemporaryFileName(string $suggestedFileName = null): string\n {\n if ($suggestedFileName) {\n $suggestedFileName = basename($suggestedFileName);\n }\n\n return parent::getTemporaryFileName($suggestedFileName);\n }\n```\n\n### References\n - [Path Traversal](https://owasp.org/www-community/attacks/Path_Traversal)\n - [How to Decorate Services](https://symfony.com/doc/5.4/service_container/service_decoration.html)\n\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" : "oro/platform"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "4.1.0"
}, {
"last_affected" : "4.1.13"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "oro/platform"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "4.2.0"
}, {
"last_affected" : "4.2.10"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "oro/platform"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "5.0.0"
}, {
"fixed" : "5.0.8"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/oroinc/platform/security/advisories/GHSA-9v3j-4j64-p937"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-41951"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/oroinc/platform"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2023-11-27T23:28:52Z",
"nvd_published_at" : "2023-11-27T21:15:07Z"
}
}