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
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
- Search Open AI Vulnerability Analysis AML.T0001
- Denial of AI Service AML.T0029
- Verify Attack AML.T0042
- AI-Enabled Product or Service AML.T0047
- External Harms: Financial Harm AML.T0048.000
- LLM Prompt Injection: Direct AML.T0051.000
- AI Agent Tool Invocation AML.T0053
- Unsecured Credentials AML.T0055
- Prompt Infiltration via Public-Facing Application AML.T0093
Source citation records
- MITRE ATLAS: Achieving Code Execution in MathGPT via Prompt Injection · MITRE ·
- Exploring prompt-based attacks · Cited by MITRE ATLAS; publisher not independently verified
- Measuring Mathematical Problem Solving With the MATH Dataset · Cited by MITRE ATLAS; publisher not independently verified
- Exploring prompt-based attacks · Cited by MITRE ATLAS; publisher not independently verified
- Reverse Prompt Engineering for Fun and (no) Profit · Cited by MITRE ATLAS; publisher not independently verified
- Training Verifiers to Solve Math Word Problems · Cited by MITRE ATLAS; publisher not independently verified