CVE-2024-8238
HIGH 8.1CVSS 3.1Aim Improper Access Control
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.
- Published
- 20 Mar 2025
- Last modified
- 7 Jul 2026
- Assigned by
- security@huntr.dev
- NVD status
- Modified
- Weakness
- CWE-1336CWE-284
- Also known as
- GHSA-r229-5wgf-f28gPYSEC-2026-1094
- Sources
- NVDJSONOSV GHSA-r229-5wgf-f28gJSONOSV PYSEC-2026-1094JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | HIGH 8.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | security@huntr.dev (Secondary) | CVSS 3.0 | MEDIUM 5.9 | CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N |
| OSV | GitHub | CVSS 3.0 | MEDIUM 5.9 | CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N |
| OSV | PyPA | CVSS 3.0 | MEDIUM 5.9 | CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | aimstack | aimcpe:2.3:a:aimstack:aim:3.22.0:*:*:*:*:python:*:* |
= 3.22.0 | |
| OSV | PyPI | aim | >= 3.0.0, <= 3.22.0 |
References
- https://huntr.com/bounties/4e140ef9-f6d1-4e68-a44c-3b9e856924d3 · Exploit, Third Party Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2024-8238 · ADVISORY
- https://github.com/aimhubio/aim · PACKAGE
- https://github.com/aimhubio/aim/blob/main/aim/storage/query.py#L45 · WEB
- https://pypi.org/project/aim · PACKAGE
- https://github.com/advisories/GHSA-r229-5wgf-f28g · ADVISORY
History
- 25 Nov 2026 20:57 UTC · NVD: first stored (published 20 Mar 2025)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 7 Jul 2026)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 20 Mar 2025)