{"id":"CVE-2024-8238","aliases":["EUVD-2025-6893","GHSA-r229-5wgf-f28g","PYSEC-2026-1094"],"status":"published","title":"Unrestricted Code Execution in aimhubio/aim","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.","severity":{"version":"3.0","score":5.9,"vector":"CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","level":"medium","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-10","score":0.00774,"percentile":0.56051,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":false},"cwes":["CWE-1336","CWE-284"],"published":"2025-03-20T10:11:09Z","modified":"2026-10-28T02:30:46Z","affected":[{"source":"ghsa","ecosystem":"PyPI","package":"aim","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.0.0"},{"last_affected":"3.22.0"}]}]},{"source":"osv","ecosystem":"PyPI","package":"aim","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.0.0"},{"last_affected":"3.22.0"}]}],"versions":["3.0.0","3.0.1","3.0.2","3.0.3","3.0.4","3.0.5","3.0.6","3.0.7","3.1.0","3.1.1","3.10.0","3.10.0.dev9","3.10.1","3.10.2","3.10.3","3.11.0","3.11.0.dev4","3.11.1","3.11.1.dev1","3.11.2","3.12.0","3.12.0.dev2","3.12.1","3.12.2","3.13.0","3.13.1","3.13.2","3.13.3","3.13.4","3.14.0","3.14.1","3.14.2","3.14.3","3.14.4","3.15.0","3.15.1","3.15.2","3.16.0","3.16.1","3.16.2","3.17.0","3.17.1","3.17.2","3.17.3","3.17.4","3.17.5","3.17.5rc1","3.17.5rc2","3.17.5rc3","3.17.5rc4","3.18.0","3.18.0.dev2","3.18.0.dev3","3.18.0.dev4","3.18.0.dev5","3.18.1","3.19.0","3.19.1","3.19.2","3.19.3","3.2.0","3.2.1","3.2.2","3.20.1","3.21.0","3.22.0","3.3.0","3.3.1","3.3.2","3.3.3","3.3.4","3.3.5","3.4.0","3.4.1","3.5.0","3.5.1","3.5.2","3.5.3","3.5.4","3.6.0","3.6.1","3.6.2","3.6.3","3.7.0","3.7.1","3.7.2","3.7.3","3.7.4","3.7.5","3.8.0","3.8.1","3.9.0a1","3.9.0a14","3.9.2","3.9.3","3.9.4"]},{"source":"osv","ecosystem":"PyPI","package":"aim","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.0.0"},{"last_affected":"3.22.0"}]}],"versions":["3.0.0","3.0.1","3.0.2","3.0.3","3.0.4","3.0.5","3.0.6","3.0.7","3.1.0","3.1.1","3.10.0","3.10.0.dev9","3.10.1","3.10.2","3.10.3","3.11.0","3.11.0.dev4","3.11.1","3.11.1.dev1","3.11.2","3.12.0","3.12.0.dev2","3.12.1","3.12.2","3.13.0","3.13.1","3.13.2","3.13.3","3.13.4","3.14.0","3.14.1","3.14.2","3.14.3","3.14.4","3.15.0","3.15.1","3.15.2","3.16.0","3.16.1","3.16.2","3.17.0","3.17.1","3.17.2","3.17.3","3.17.4","3.17.5","3.17.5rc1","3.17.5rc2","3.17.5rc3","3.17.5rc4","3.18.0","3.18.0.dev2","3.18.0.dev3","3.18.0.dev4","3.18.0.dev5","3.18.1","3.19.0","3.19.1","3.19.2","3.19.3","3.2.0","3.2.1","3.2.2","3.20.1","3.21.0","3.22.0","3.3.0","3.3.1","3.3.2","3.3.3","3.3.4","3.3.5","3.4.0","3.4.1","3.5.0","3.5.1","3.5.2","3.5.3","3.5.4","3.6.0","3.6.1","3.6.2","3.6.3","3.7.0","3.7.1","3.7.2","3.7.3","3.7.4","3.7.5","3.8.0","3.8.1","3.9.0a1","3.9.0a14","3.9.2","3.9.3","3.9.4"]}],"products":[{"vendor":"aimhubio","product":"aimhubio/aim"},{"vendor":"aimstack","product":"aim"}],"references":[{"url":"https://huntr.com/bounties/4e140ef9-f6d1-4e68-a44c-3b9e856924d3","tags":["Exploit","Third Party Advisory","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-8238","tags":["advisory"]},{"url":"https://github.com/aimhubio/aim/blob/main/aim/storage/query.py#L45","tags":["web"]},{"url":"https://github.com/advisories/GHSA-r229-5wgf-f28g","tags":["advisory"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/8xxx/CVE-2024-8238.json","tags":["advisory"]},{"url":"https://github.com/aimhubio/aim","tags":["package"]},{"url":"https://pypi.org/project/aim","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2024-8238","title":"Unrestricted Code Execution in aimhubio/aim","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.","status":"published","published":"2025-03-20T10:11:09.622Z","modified":"2025-10-15T12:49:56.303Z","cvss":[{"version":"3.0","score":5.9,"vector":"CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","level":"medium","assessor":"cna"}],"cwes":["CWE-1336"],"updated_at":"2026-11-02T14:34:09.216761Z"}],"euvd":[{"id":"EUVD-2025-6893","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.","status":"published","published":"2025-03-20T10:11:09Z","modified":"2025-10-15T12:49:56Z","cvss":[{"version":"3.0","score":5.9,"vector":"CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","level":"medium"}],"updated_at":"2026-11-02T20:31:32.071816Z"}],"ghsa":[{"id":"GHSA-r229-5wgf-f28g","title":"Aim Improper Access Control","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.","status":"published","published":"2025-03-20T12:32:47Z","modified":"2025-10-15T16:07:54Z","cvss":[{"version":"3.0","score":5.9,"vector":"CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","level":"medium"}],"cwes":["CWE-284","CWE-1336"],"updated_at":"2026-11-02T14:39:01.677422Z"}],"nvd":[{"id":"CVE-2024-8238","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.","status":"published","published":"2025-03-20T10:15:41.613Z","modified":"2026-06-17T08:22:10.84Z","cvss":[{"version":"3.1","score":8.1,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"high","assessor":"primary"},{"version":"3.0","score":5.9,"vector":"CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","level":"medium","assessor":"secondary"}],"cwes":["CWE-1336"],"updated_at":"2026-11-02T14:10:45.815983Z"}],"osv":[{"id":"CVE-2024-8238","title":"Unrestricted Code Execution in aimhubio/aim","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.","status":"published","published":"2025-03-20T10:11:09.622Z","modified":"2026-10-28T02:30:46.407691592Z","cvss":[{"version":"3.0","score":5.9,"vector":"CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","level":"medium"}],"cwes":["CWE-1336"],"updated_at":"2026-11-02T15:44:45.405014Z"},{"id":"GHSA-r229-5wgf-f28g","title":"Aim Improper Access Control","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.","status":"published","published":"2025-03-20T12:32:47Z","modified":"2026-07-07T17:57:06.075360658Z","cvss":[{"version":"3.0","score":5.9,"vector":"CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","level":"medium"}],"cwes":["CWE-1336","CWE-284"],"updated_at":"2026-11-02T15:46:55.122811Z"},{"id":"PYSEC-2026-1094","title":"Aim Improper Access Control","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.","status":"published","published":"2026-07-07T14:34:56.945764Z","modified":"2026-07-07T17:46:18.131470461Z","cvss":[{"version":"3.0","score":5.9,"vector":"CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","level":"medium"}],"updated_at":"2026-11-02T15:52:54.622769Z"}]}}
