{"id":"CVE-2024-8238","aliases":["CVE-2024-8238","GHSA-r229-5wgf-f28g","PYSEC-2026-1094"],"related":[],"kind":"vulnerability","state":"published","title":"Unrestricted Code Execution in aimhubio/aim","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","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.","source":"cvelist"},{"lang":"es","text":"En la versión 3.22.0 de aimhubio/aim, el lenguaje de consulta AimQL utiliza una versión obsoleta de la función safer_getattr() de RestrictedPython. Esta versión no protege contra el método str.format_map(), lo que permite a un atacante filtrar información confidencial del servidor o potencialmente obtener ejecución de código sin restricciones. La vulnerabilidad surge porque str.format_map() puede leer atributos arbitrarios de objetos Python, lo que permite a los atacantes acceder a variables sensibles como os.environ. Si un atacante puede escribir archivos en una ubicación conocida del servidor Aim, puede usar str.format_map() para cargar un archivo .dll/.so malicioso en el intérprete de Python, lo que provoca la ejecución de código sin restricciones.","source":"nvd"}],"published":"2025-03-20T10:11:09.622Z","modified":"2026-07-07T17:57:06.075Z","severity":{"scorer":"@huntr_ai","scheme":"CVSS:3.0","vector":"CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","score":5.9,"rating":"MEDIUM"},"severities":[{"scorer":"@huntr_ai","scheme":"CVSS:3.0","vector":"CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","score":5.9,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.0","vector":"CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","score":5.9,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","score":8.1,"rating":"HIGH"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.0","vector":"CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","score":5.9,"rating":"MEDIUM"}],"cwes":["CWE-284","CWE-1336"],"affected":[{"ranges":[{"type":"custom","introduced":"unspecified","lastAffected":"latest","status":"affected"}],"vendor":"aimhubio","product":"aimhubio/aim","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"3.0.0","status":"affected","lastAffected":"3.22.0"}],"ecosystem":"PyPI","package":"aim","purl":"pkg:pypi/aim","source":"ghsa"},{"ranges":[{"status":"affected","version":"3.22.0"}],"vendor":"aimstack","product":"aim","cpe":"cpe:2.3:a:aimstack:aim:3.22.0:*:*:*:*:python:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"3.0.0","status":"affected","lastAffected":"3.22.0"}],"ecosystem":"PyPI","package":"aim","purl":"pkg:pypi/aim","source":"pysec"}],"references":[{"url":"https://huntr.com/bounties/4e140ef9-f6d1-4e68-a44c-3b9e856924d3","tags":["exploit","third-party-advisory","web"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-8238","tags":["advisory"],"sources":["ghsa","pysec"]},{"url":"https://github.com/aimhubio/aim","tags":["package"],"sources":["ghsa","pysec"]},{"url":"https://github.com/aimhubio/aim/blob/main/aim/storage/query.py#L45","tags":["web"],"sources":["ghsa","pysec"]},{"url":"https://pypi.org/project/aim","tags":["package"],"sources":["pysec"]},{"url":"https://github.com/advisories/GHSA-r229-5wgf-f28g","tags":["advisory"],"sources":["pysec"]}],"credits":[],"assigner":"@huntr_ai","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2025-03-20T14:23:53.865Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-8238","url":"https://www.cve.org/CVERecord?id=CVE-2024-8238","licence":"CVE Terms of Use","modified":"2025-10-15T12:49:56.303Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-r229-5wgf-f28g","url":"https://github.com/advisories/GHSA-r229-5wgf-f28g","licence":"CC-BY-4.0","modified":"2026-07-07T17:57:06.075Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-8238","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-8238","licence":"Public domain","modified":"2026-06-17T08:22:10.840Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-1094","url":"https://osv.dev/vulnerability/PYSEC-2026-1094","licence":"CC-BY-4.0","modified":"2026-07-07T17:46:18.131Z"}],"updatedAt":"2026-11-25T22:58:52.393Z","epss":{"score":0.00944,"percentile":0.59617,"date":"2026-11-30T12:00:22.000Z"}}