{"id":"CVE-2024-8238","state":"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.","publishedAt":"2025-03-20T10:11:09.622Z","updatedAt":"2025-10-15T12:49:56.303Z","severity":{"score":5.9,"label":"Medium","version":"3.0","vector":"CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","source":"@huntr_ai"},"assigner":"@huntr_ai","products":["aimhubio aimhubio/aim"],"affected":[{"vendor":"aimhubio","product":"aimhubio/aim","versions":[{"version":"unspecified","status":"affected","lessThanOrEqual":"latest","versionType":"custom"}]}],"references":["https://huntr.com/bounties/4e140ef9-f6d1-4e68-a44c-3b9e856924d3"],"weaknesses":["CWE-1336"],"ingestedAt":"2026-10-29T20:08:20.985Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/8xxx/CVE-2024-8238.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.1","cveMetadata":{"cveId":"CVE-2024-8238","state":"PUBLISHED","datePublished":"2025-03-20T10:11:09.622Z","dateUpdated":"2025-10-15T12:49:56.303Z","assignerShortName":"@huntr_ai","assignerOrgId":"c09c270a-b464-47c1-9133-acb35b22c19a","dateReserved":"2024-08-27T18:43:22.990Z"},"containers":{"cna":{"title":"Unrestricted Code Execution in aimhubio/aim","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"aimhubio","product":"aimhubio/aim","versions":[{"version":"unspecified","status":"affected","lessThanOrEqual":"latest","versionType":"custom"}]}],"references":[{"url":"https://huntr.com/bounties/4e140ef9-f6d1-4e68-a44c-3b9e856924d3"}],"metrics":[{"cvssV3_0":{"version":"3.0","attackComplexity":"HIGH","attackVector":"NETWORK","availabilityImpact":"NONE","confidentialityImpact":"HIGH","integrityImpact":"NONE","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"NONE","vectorString":"CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","baseScore":5.9,"baseSeverity":"MEDIUM"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-1336","type":"CWE","lang":"en","description":"CWE-1336 Improper Neutralization of Special Elements Used in a Template Engine"}]}],"providerMetadata":{"shortName":"@huntr_ai","orgId":"c09c270a-b464-47c1-9133-acb35b22c19a","dateUpdated":"2025-10-15T12:49:56.303Z"},"source":{"advisory":"4e140ef9-f6d1-4e68-a44c-3b9e856924d3","discovery":"EXTERNAL"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2025-03-20T14:23:53.865956Z","id":"CVE-2024-8238","options":[{"Exploitation":"poc"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2025-03-20T14:23:58.235Z"}}]}}}