{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2024-8238","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 objec","descriptionLong":"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":"2025-03-20T10:11:09.622Z","updated":"2026-10-28T02:30:46.407691592Z","reserved":"2024-08-27T18:43:22.990Z","status":"Modified","rejected":false,"assigner":"@huntr_ai","metric":{"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","rating":"high","source":"NVD"},"metrics":[{"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","rating":"high","source":"NVD"},{"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","rating":"medium","source":"@huntr_ai"},{"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","rating":"medium","source":"huntr.dev"},{"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","rating":"medium","source":"OSV"},{"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","rating":"medium","source":"GitHub"}],"rating":"high","products":["aimhubio/aim"],"affectedProducts":[{"vendor":"aimhubio","product":"aimhubio/aim","defaultStatus":null,"versions":[{"version":"unspecified","status":"affected","versionType":"custom","lessThanOrEqual":"latest"}],"platforms":[]}],"packages":[{"ecosystem":"PyPI","name":"aim","purl":"pkg:pypi/aim","ranges":[">=3.0.0 <=3.22.0"],"fixed":[],"advisory":"GHSA-r229-5wgf-f28g"}],"cwes":["CWE-1336","CWE-284"],"aliases":["GHSA-r229-5wgf-f28g","PYSEC-2026-1094"],"references":[{"url":"https://huntr.com/bounties/4e140ef9-f6d1-4e68-a44c-3b9e856924d3","tags":["Exploit","Third Party Advisory","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/8xxx/CVE-2024-8238.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-8238","tags":["advisory"]},{"url":"https://github.com/aimhubio/aim","tags":["package"]},{"url":"https://github.com/aimhubio/aim/blob/main/aim/storage/query.py#L45","tags":["web"]},{"url":"https://pypi.org/project/aim","tags":["package"]},{"url":"https://github.com/advisories/GHSA-r229-5wgf-f28g","tags":["advisory"]}],"patchReferenced":false,"fixAvailable":false,"exploitReferenced":true,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial"},"epss":0.00774,"epssPercentile":0.56509,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2024-8238","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-8238","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2024-8238","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-r229-5wgf-f28g","ok":true,"note":"GHSA-r229-5wgf-f28g"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2024-8238","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}