Prompt Injecting Your Way to Shell: OpenAI's Containerized ChatGPT Environment
0din.ai
0din.ai
There are obvious formatting tells, and then less obvious word choice tells (e.g., delve), and lastly an excess verbosity and genericness that leaves one unsatisfied, like eating a low-sugar sweet. The concept is cool, but this article could have been reduced to a tweet.
This is my truth.
There's not much in here that feels like a security vulnerability to me.
The one exception is the thing where you can download files from GPTs. If you create a custom GPT with files in it those files are visible in the /data directory that is visible to Code Interpreter, which means users can request ChatGPT to zip them up and allow you to download that zip file.
This is a known issue which I've seen people complaining about before, and I'm a little surprised that OpenAI haven't addressed it.
It makes sense for files uploaded to a GPT to be visible to Code Interpreter in some cases - my own JavaScript Code Interpreter - https://simonwillison.net/2023/Nov/15/gpts/#javascript-code-... - bundles a Deno binary so Python can shell out to it and run JavaScript, for example.
But if you're uploading files to have them chunked and embedded and used for RAG you might not want the raw PDFs to be available in Code Interpreter as well.
One solution would be for GPTs to allow you to specify if each file should be used for RAG or Code Interpreter or both when you upload them.
GPTs haven't had much developer attention since they launched last year though.
I've been running a scraper against Code Interpreter for a while to track changes made to both the internal code and the available packages - you can see that here: https://github.com/simonw/scrape-openai-code-interpreter
It seems the main takeaway is that ChatGPT is running in a sandboxed environment and is designed to execute arbitrary code?
[0] Which shouldn't even be fightable in the first place except people cut lots of corners.
The article even says so if you read all the way to the end.
Which is kind of pointless because the ls command is probably executed through a shell anyways.
So technically correct. But getting root or running a shell usually means you can run arbitrary commands, which is a check here (albeit I wouldn't say there's root access)
It is like reporting that AWS lambda is susceptible to arbitrary code execution.
But he did run a shell