CVE-2024-8238 Details
Description
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.
A vulnerability allowing unrestricted code execution has been identified in aimhubio Aim version 3.22.0. The issue arises in the AimQL query language, which relies on an outdated version of the safer_getattr() function from RestrictedPython. This outdated version fails to properly restrict access to the str.format_map() method, enabling attackers to leak server-side secrets or potentially execute arbitrary code. The vulnerability exists because str.format_map() can read arbitrary attributes from Python objects, allowing access to sensitive variables such as environment variables. If an attacker can write files to a known location on the Aim server, they could use str.format_map() to load a malicious dynamic library into the Python interpreter, leading to unrestricted code execution.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Mar 20, 2025References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://huntr.com/bounties/4e140ef9-f6d1-4e68-a44c-3b9e856924d3 | [email protected] | ExploitThird Party Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-1336 | Improper Neutralization of Special Elements Used in a Template Engine | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| aimstack aim | 3.22.0 |
CPE
Remediation
| |
Change History
5 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Oct 15, 2025 | CVE Modified | [email protected] |
| Jul 23, 2025 | Initial Analysis | [email protected] |
| Mar 20, 2025 | New CVE Received | [email protected] |