Documented Exercise · AML.CS0016 · Critical severity

Achieving Code Execution in MathGPT via Prompt Injection

Disclosed in January 2023, researchers demonstrated direct prompt injection against MathGPT, a public web application that translated natural-language math questions into Python code executed on the server. By crafting adversarial prompts that overrode the application's system instructions, attackers forced the LLM to emit arbitrary Python payloads, enabling server-side code execution, API key theft, and denial of service.

Exercise dossier metadata

Case ID
AML.CS0016
Classification
Exercise
Date
Severity
Critical
Sector
AI Application Development & Education
Attack vector
Direct Prompt Injection to Arbitrary Code Execution
System type
LLM-powered math solver with Python interpreter execution (MathGPT)
CVE / reference
AML.CS0016
Reference URI
https://raw.githubusercontent.com/mitre-atlas/atlas-data/f56c1468731d6428e5bf875263b4643b46d67437/dist/v6/ATLAS-2026.10.yaml#:~:text=AML.CS0016%3A

Inspect AML.CS0016 in Interactive Incidents & Cases Hub

Defensive takeaway

Never execute LLM-generated code directly on an application host with access to secrets; run code inside ephemeral, network-isolated microVMs or containers with zero credential mounts.

Mapped AI security techniques

Source citation records