testing-llm-insecure-output-handling

Solid

Test what happens after the model speaks: whether an application trusts model output and passes it, unescaped, into a browser, a terminal, a shell, a database, or another system. Covers model-driven XSS and markup injection, data exfiltration through rendered markdown images and links, terminal and ANSI escape injection, invisible-unicode and ascii smuggling in output, and output used to build code, SQL, or shell commands. Use when reviewing any app that renders, executes, or forwards LLM output. The model's output is an untrusted string.

AI & Automation 4 stars 1 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 80/100

Stars 20%
23
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Testing LLM insecure output handling: the output is the other half Most LLM security attention is on the input. The output is the other half. An application that treats model output as safe and renders or executes it inherits an injection primitive, because the model can be steered (by a user or by poisoned content) into emitting exactly the payload the downstream sink will trust. The model becomes a confused deputy that writes the attacker's markup, escape sequence, or query, and the app runs it. ## When to use - The app renders model output as HTML or markdown in a browser. - The output is printed to a terminal, written to logs, or shown in a CLI agent. - Model output is concatenated into a shell command, a SQL query, a file path, or code that gets executed. - Output is forwarded to another tool, agent, or stored and later displayed. ## Scope check Test outputs and sinks you own or are authorized to test. Use benign canary payloads and observe your own instrumentation; never exfiltrate real data. If you can't name the authorization, stop. ## The loop 1. **Trace every sink model output flows into.** Follow the output from the model to where it lands: rendered as HTML or markdown, printed to a terminal, concatenated into a shell command or SQL, written to a file or log, fed to another tool or agent, stored and later displayed. Each is a sink that may trust the text. 2. **Classify each sink's escaping.** For each, ask what the sink executes and whether ...

Details

Author
UnboundCompute
Repository
UnboundCompute/security-agent-skills
Created
5 days ago
Last Updated
yesterday
Language
N/A
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Solid

llm-app-security

Securing a feature that calls an LLM: prompt injection as an unsolved input problem, bounding what model output is allowed to reach, tool authorization against the human rather than the model, approval gates on consequential actions, RAG context provenance, system-prompt leakage, and cost limits. Use when sending prompts to an LLM API, building a RAG pipeline, giving a model tools, rendering or executing model output, or exposing an LLM-backed endpoint.

22 Updated 1 weeks ago
ShieldNet-360
AI & Automation Listed

red-team-llm-app

Use this to adversarially test an LLM/agent app before attackers do - prompt injection, jailbreaks, data exfiltration, tool misuse, and unsafe output. Trigger on "red team my LLM", "test for prompt injection", "is my agent secure", "jailbreak testing", "security review of my AI app", especially before shipping anything customer-facing or with tools/data access. Test systematically against the known attack classes, not ad-hoc.

29 Updated 4 days ago
ContextJet-ai
AI & Automation Featured

hunt-llm-ai

Hunt LLM/AI feature bugs — prompt injection, indirect injection, exfiltration via tool-use/markdown, ASCII smuggling, agentic AI security (OWASP Agentic Apps 2026, ASI01-ASI10). Patterns: direct injection ('ignore previous instructions'), indirect injection via documents/web pages/email the model reads, ASCII smuggling (Unicode Tags block U+E0000-U+E007F, invisible to humans, decoded by the model), tool-use exfiltration (model has fetch/browse tool, attacker injects OOB URL, model exfils chat history/secrets), markdown-image zero-click exfil, system-prompt extraction, IDOR-via-AI (cross-tenant data). Targets: chatbots, RAG, summarizers, agentic copilots, MCP tools. Detection: any LLM-backed endpoint, doc upload triggering AI processing, autonomous agent with tools. Validate: OOB/Collaborator callback for exfil, verbatim-reproducible system-prompt leak (run twice), verifiable cross-tenant leak or RCE. Confabulation is NOT a finding. Use when hunting AI features, chatbots, RAG, agentic systems, MCP.

3,709 Updated today
elementalsouls