Code Execution in MathGPT via Prompt Injection
Attack on AI1 Research / proof of conceptPrompt injectionAgent hijack
Researchers demonstrated that prompt injection against the MathGPT application could steer GPT-3 into generating unauthorized executable Python code. The demonstration highlighted risks in applications that directly execute model-generated code.
Details
- type
- Attack on AIAn AI model, agent or AI-powered product was the thing exploited, abused or leaked.
- categories
- Prompt injectionprimaryUntrusted content (web pages, documents, emails, tool output) steers a model into ignoring its instructions.
- Agent hijackAn AI agent is tricked into unauthorized actions: tool misuse, data exfiltration through the agent, or acting against its principal.
- Prompt injectionprimary
- owasp llm top 10
- mitre atlas
- Both rows are derived from the type and categories (OWASP 2025 edition, ATLAS release 2026.09), not classified per record. How
- severity
- 1 · Research / proof of conceptDemonstrated by researchers; no known real-world exploitation.
- targets
- OpenAI, Enterprise deployment
- products
- MathGPT, GPT-3
- incident date
- 28 Jan 2023
- first reported
- 1 Mar 2023
- origin
- MITRE ATLASDerived from MITRE ATLAS (Apache 2.0, © MITRE).
- classifier confidence
- 0.95 · published at or above 0.80; see the methodology
- tags
- prompt_injection · code_execution
- record
- created 2026-10-18 06:55Z · updated 2026-10-18 06:55Z · json
Sources · 5
- 2023-03-01Achieving Code Execution in MathGPT via Prompt InjectionMITRE ATLAS · atlas.mitre.org/studies/AML.CS0016
- 2023-03-01Measuring Mathematical Problem Solving With the MATH DatasetarXiv · arxiv.org/abs/2103.03874
- 2023-03-01Training Verifiers to Solve Math Word ProblemsarXiv · arxiv.org/abs/2110.14168
- 2023-03-01Reverse Prompt Engineering for Fun and (no) Profitlspace.swyx.io · lspace.swyx.io/p/reverse-prompt-eng
- 2023-03-01Exploring prompt-based attacksresearch.nccgroup.com · research.nccgroup.com/2022/12/05/exploring-prompt-injection-attacks
Titles and links belong to their publishers. The summary above is written by GCD AI RADAR in its own words; data is CC BY-SA 4.0.
Related incidents
- 2023-03-26LLM Application Frameworks Allow Remote Code Execution via Prompting1 Researchon AIPrompt inj.Agent hijack4 src
- 2022-09-15Remoteli.io GPT-3 Twitter bot hijacked via prompt injection3 Exploitedon AIPrompt inj.1 src
- 2023-10-30Bing Chat Data Exfiltration via Indirect Prompt Injection1 Researchon AIPrompt inj.Agent hijack2 src
- 2023-02-08Bing Chat Initial Instructions Exposed via Prompt Injection by Testers1 Researchon AIPrompt inj.Data leak1 src
- 2023-10-30ChatGPT Conversation Exfiltration via Indirect Prompt Injection1 Researchon AIPrompt inj.Data leak2 src
- 2023-03-11Samsung Source Code and Meeting Records Disclosed via ChatGPT Ingestion4 Real losson AIData leak1 src