CVE-2024-8238: Aim Aim Improper Access Control Vulnerability
MODERATECVE-2024-8238 is a MODERATE (CVSS 5.9) aim improper access control vulnerability (CWE-284: Improper Access Control) affecting Aim libraries in the PyPI ecosystem. The issue involves aim improper access control. Remediation is available in the latest vendor maintenance releases.
CVE-2024-8238 at a Glance
Security Impact
CVSS: 5.9
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N).
How to Fix CVE-2024-8238
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>=Latest secure release
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-2024-8238, 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 the patched release), 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-284: Improper Access Control, where the product does not restrict or incorrectly restricts access to a resource from an unauthorized actor. 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-2024-8238 Affected Aim Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
aim
|
PyPI |
≥ 3.0.0
≤ 3.22.0
|
|
References
Frequently Asked Questions
What is CVE-2024-8238?
Which Aim versions are affected?
What version fixes CVE-2024-8238?
Is aim affected?
What is the CVSS score of CVE-2024-8238?
What CWE is associated with CVE-2024-8238?
How can I check PyPI dependencies for CVE-2024-8238?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-r229-5wgf-f28g",
"modified" : "2025-03-20T20:41:28Z",
"published" : "2025-03-20T12:32:47Z",
"aliases" : [ "CVE-2024-8238" ],
"summary" : "Aim Improper Access Control",
"details" : "In version 3.22.0 of aimhubio/aim, the AimQL query language uses an outdated version of the safer_getattr() function from RestrictedPython. This version does not protect against the str.format_map() method, allowing an attacker to leak server-side secrets or potentially gain unrestricted code execution. The vulnerability arises because str.format_map() can read arbitrary attributes of Python objects, enabling attackers to access sensitive variables such as os.environ. If an attacker can write files to a known location on the Aim server, they can use str.format_map() to load a malicious .dll/.so file into the Python interpreter, leading to unrestricted code execution.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "aim"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.0.0"
}, {
"last_affected" : "3.22.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-8238"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/aimhubio/aim"
}, {
"type" : "WEB",
"url" : "https://github.com/aimhubio/aim/blob/main/aim/storage/query.py#L45"
}, {
"type" : "WEB",
"url" : "https://huntr.com/bounties/4e140ef9-f6d1-4e68-a44c-3b9e856924d3"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1336", "CWE-284" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2025-03-20T20:41:28Z",
"nvd_published_at" : "2025-03-20T10:15:41Z"
}
}