Disclosed vulnerability
Code execution in MathGPT via prompt injection against LLM-generated Python
AIR-2023-0002 AIR record · 2023-01-mathgpt-prompt-injection-rce
From the supporting source
In the MathGPT application, GPT-3 is used to convert the user's natural language question into Python code that is then executed.raw.githubusercontent.com
The record
Disclosed
2023-01-28
Occurred
2023-01-28
Vendor
MathGPT / Streamlit
Product
MathGPT (Streamlit app)
Risk domain
Access control and permissions › Credential theft
Also touches
Uncontrolled resource consumption
System type
Generative model
Who acted
Agent acted — the app executed the LLM-generated Python
Attack surface
Other
Autonomy level
Semi-autonomous
Initial vector
Direct prompt injection user input
Impact type
Credential theft, Denial of service
Confidence
Medium
Submitted by
EAI Internal
Crosswalk
- OWASP Agentic Top 10 (2026)
- ASI03 – Identity and Privilege Abuse
- MITRE ATLAS
- AML.T0012 – Valid Accounts
- NIST AI RMF
- MEASURE 2.7
- EU AI Act
- Article 13
- ISO/IEC
- TR 24028; 42001; 23894
- AIUC-1
- B. Security
- Scope
- tool failure
- Mitigation
- Use secure credential storage; Implement short-lived tokens.
- Taxonomy
- Enkrypt AI agent risk taxonomy · Black-Box Red Teaming of Agentic AI: A Taxonomy-Driven Framework for Automated Risk Discovery
Blast radius
single public Streamlit application and its GPT-3 API key
Capability abused
Defense & remediation
Guardrail kinds
Unknown
Guardrail outcome
Silent
Fix shipped
prompt filtering + API key rotation by MathGPT/Streamlit teams
Taxonomy & references
Curator notes
Reported by Ludwig-Ferdinand Stumpp. The NCC Group reference URL now redirects to a landing page, so the quote is taken verbatim from MITRE ATLAS's own published data file. One of the earliest LLM-emits-code-that-is-executed incidents.
Supporting sources
Cite as
Enkrypt AI. "Code execution in MathGPT via prompt injection against LLM-generated Python". AIR, AIR-2023-0002. https://agentincident.vercel.app/i/AIR-2023-0002/ (accessed 2026-10-19).