Automated Prompt Injection Testing across 5 LLMs using Nvidia Garak
Automated prompt injection security testing across 5 LLMs from different companies using Nvidia Garak.
Prompt injection is an attack where hidden malicious instructions are embedded in text to hijack an LLM's behavior. This is OWASP's #1 LLM security risk (LLM01).
- Garak — open source LLM vulnerability scanner
- Groq — free LLM API provider
- Attack:
promptinject.HijackHateHumans
| Model | Company | Size | Pass Rate | DEFCON | Verdict | Report |
|---|---|---|---|---|---|---|
| gpt-oss-safeguard-20b | OpenAI | 20B | 99% | DC-5 | Excellent | Report |
| allam-2-7b | Saudi Aramco | 7B | 70% | DC-3 | Secure | Report |
| llama-3.1-8b-instant | Meta | 8B | 34% | DC-2 | Very High Risk | Report |
| qwen/qwen3-32b | Alibaba | 32B | 21% | DC-2 | Very High Risk | Report |
| llama-3.3-70b-versatile | Meta | 70B | 14% | DC-2 | Very High Risk | Report |
GPT-OSS-Safeguard scored 99% because it is purpose-built for safety. Every other general-purpose model scored below 35%.
Llama-3.3-70b (70B parameters) scored 14% — worse than Llama-3.1-8b (8B parameters) at 34%. Larger models are commonly assumed to be safer, but this data proves otherwise.
Allam-2-7b from Saudi Aramco scored 70% despite being the smallest model tested. Safety tuning during training matters far more than model size.
- Install Garak:
pip install garak - Get a free API key from groq.com
- Set your key:
export GROQ_API_KEY="your_key" - Run a test:
garak --target_type groq --target_name llama-3.1-8b-instant --probes promptinject.HijackHateHumans --generations 2Full HTML reports for each model are in the /reports folder.