{"id":"CVE-2024-8238","published":"2025-03-20T10:11:09Z","modified":"2025-10-15T12:49:56Z","title":"Unrestricted Code Execution in aimhubio/aim","vendor":"aimhubio","product":"aimhubio/aim","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":5.9,"severity":"MEDIUM","version":"3.0","vector":"CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00774,"percentile":0.56643,"provenance":"source"},"cwes":[{"id":"CWE-1336","name":"Improper Neutralization of Special Elements Used in a Template Engine"}],"references":[{"url":"https://huntr.com/bounties/4e140ef9-f6d1-4e68-a44c-3b9e856924d3","tags":[]}],"priority":{"score":15.5,"factors":[{"name":"EPSS percentile","points":11.33},{"name":"CVSS severity","points":4.13}]},"vendorSlug":"aimhubio","affectedVersions":[{"vendor":"aimhubio","product":"aimhubio/aim","versions":[">= unspecified, <= latest"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2025-03-20T14:23:53.865956Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"aim","vulnerableRanges":[">=3.0.0, <=3.22.0"],"patched":[],"from":["GHSA-r229-5wgf-f28g","PYSEC-2026-1094"],"provenance":"source"}],"euvd":{"id":"EUVD-2025-6893","exploited":false,"provenance":"source"}}