CVE-2024-8238: aimhubio/aim · Improper Neutralization of Special Elements Used in a Template Engine
Affects aimhubio/aimSource CVE Database V5
Not known to be exploited · CVSS 5.9 Medium.
Data as of 26 Oct 2026, 07:57 UTC
- EPSS
- 0.7% chance of exploitation in 30 days – higher than 55% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:NExploitation evidence
Disclosed: evidence found.
CVE published 20 Mar 2025
Detectable: no evidence on record.
No public nuclei template indexed
Weaponised: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 2026-10-26.
What to do
Affected software
| Product | Affected | Fixed in |
|---|---|---|
PyPIaimhubio/aimpkg:pypi/aimhubio/aimOther threats | Affected
| Fixed in– |
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
1. Upgrade aimhubio/aim to a version that patches this vulnerability once available. 2. Until a patch is released, restrict network access to Aim servers to trusted internal networks only, using firewalls and VPNs. 3. Implement strict file system permissions to prevent unauthorized users from writing files to locations accessible by the Aim server, mitigating the risk of malicious shared library loading. 4. Monitor Aim server logs and network traffic for unusual activity indicative of exploitation attempts, such as unexpected file writes or suspicious query patterns leveraging str.format_map(). 5. Employ runtime application self-protection (RASP) or endpoint detection and response (EDR) tools to detect and block anomalous code execution behaviors. 6. Conduct regular security audits of AI/ML infrastructure and ensure secrets are stored securely, minimizing exposure if environment variables are leaked. 7. Educate developers and administrators about the risks of using outdated sandboxing libraries and encourage secure coding practices when integrating third-party components.
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.