A walkthrough of prompt injection attacks against OopsSec Store 's AI assistant, bypassing its input filters to extract a flag from the system prompt.
OopsSec Store has an AI support assistant with a secret embedded in its system prompt. The only thing standing between us and the flag is a regex blocklist. Spoiler: four regexes are not enough.
Table of contents
Environment setup
Initialize the OopsSec Store application:
npx create-oss-store oss-store cd oss-store npm start
Enter fullscreen mode
Exit fullscreen mode
Or with Docker (no Node.js required):
docker run -p 3000:3000 leogra/oss-oopssec-store
Enter fullscreen mode
Exit fullscreen mode
The AI assistant lives at http://localhost:3000/support/ai-assistant and needs a Mistral AI API key.
Obtaining a Mistral API key
Visit console.mistral.ai
Create a free account or sign in
Select the Experiment plan (free tier)
Navigate to API Keys
Create and copy your key
The free tier gives you plenty of requests for this…