CVE-2021-43775: Aim Arbitrary File Reading Vulnerability Vulnerability
CRITICALCVE-2021-43775 is a CRITICAL (CVSS 8.6) arbitrary file reading vulnerability vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Aim libraries in the PyPI ecosystem. The issue involves arbitrary file reading vulnerability in aim. Remediation is available by upgrading affected packages to version 3.1.0.
CVE-2021-43775 at a Glance
Security Impact
CVSS: 8.6
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:C/C:H/I:N/A:N).
How to Fix CVE-2021-43775
To remediate this vulnerability, upgrade all affected Aim dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install aim>=3.1.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show aim
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2021-43775, inspect your installed packages using pip:
pip show aim
Analyze the terminal output to locate any version of Aim in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.1.0), your application is affected.
Note: The pip show aim command checks currently installed packages in your active Python environment.
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 Aim, 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-43775 Affected Aim Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
aim
|
PyPI |
< 3.1.0
|
3.1.0
|
References
Frequently Asked Questions
What is CVE-2021-43775?
Which Aim versions are affected?
What version fixes CVE-2021-43775?
Is aim affected?
What is the CVSS score of CVE-2021-43775?
What CWE is associated with CVE-2021-43775?
How can I check PyPI dependencies for CVE-2021-43775?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-8phj-f9w2-cjcc",
"modified" : "2024-11-18T16:26:17Z",
"published" : "2021-11-23T22:03:23Z",
"aliases" : [ "CVE-2021-43775" ],
"summary" : "Arbitrary file reading vulnerability in Aim",
"details" : "### Impact\nA path traversal attack aims to access files and directories that are stored outside the web root folder. By manipulating variables that reference files with “dot-dot-slash (../)” sequences and its variations or by using absolute file paths, it may be possible to access arbitrary files and directories stored on file system including application source code or configuration and critical system files.\n\nVulnerable code: https://github.com/aimhubio/aim/blob/0b99c6ca08e0ba7e7011453a2f68033e9b1d1bce/aim/web/api/views.py#L9-L16\n\n### Patches\nThe vulnerability issue is resolved in Aim v3.1.0.\n\n### References\nhttps://owasp.org/www-community/attacks/Path_Traversal\n\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:H/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "aim"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.1.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/aimhubio/aim/security/advisories/GHSA-8phj-f9w2-cjcc"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-43775"
}, {
"type" : "WEB",
"url" : "https://github.com/aimhubio/aim/issues/999"
}, {
"type" : "WEB",
"url" : "https://github.com/aimhubio/aim/pull/1003"
}, {
"type" : "WEB",
"url" : "https://github.com/aimhubio/aim/commit/b9e53df5e32d14bbd3a2c738e2db7187fb531e93"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/aimhubio/aim"
}, {
"type" : "WEB",
"url" : "https://github.com/aimhubio/aim/blob/0b99c6ca08e0ba7e7011453a2f68033e9b1d1bce/aim/web/api/views.py#L9-L16"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/aim/PYSEC-2021-839.yaml"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2021-11-23T18:48:09Z",
"nvd_published_at" : "2021-11-23T21:15:00Z"
}
}