Add practical web exploit examples for unsafe AI outputs - #68
Conversation
Addresses Issue OWASP#28 - adds detailed examples of how AI-generated content can enable XSS, SQLi, Command Injection, SSRF, Path Traversal, and SSTI vulnerabilities. Includes: - 14 practical exploit scenarios - Vulnerable vs secure code comparisons - Testing methodology and payloads - Mitigation strategies and checklist
|
Hi, This guide does not attempt to replace or duplicate existing foundational security testing methodologies. Instead, it complements them by focusing on AI-specific threats. We can add it to: https://github.com/OWASP/www-project-ai-testing-guide/blob/main/Document/content/tests/AITG-APP-05_Testing_for_Unsafe_Outputs.md but we need to merge your new content. Thanks, |
|
Thanks @huasohacker for this contribution. Six months in the review queue is a long time for a substantive PR; offering a first-pass technical review in the hope it helps move it forward. OverallThe technical content is solid — 14 exploit scenarios spanning six major web-vulnerability classes (XSS, SQLi, Command Injection, SSRF, Path Traversal, SSTI) with clean vulnerable-vs-secure code pairings and a context-aware encoding table at the end. This addresses Issue #28 substantively and is the kind of practitioner-oriented reference that fills a real gap in AI-output security guidance. Some things that I think need to be addressed before merge: Structural / integration issues (the big ones)1. File placement doesn't follow the guide's taxonomy. The file is at
2. No TOC update in 3. Cross-reference inconsistency with AITG-APP-05. The header says "AITG Reference: AITG-APP-05 (Testing for Insecure Output Handling)", but the current guide has AITG-APP-05 as "Testing for Unsafe Outputs" — the name in this doc appears to reference the OWASP LLM Top 10 (LLM02: Insecure Output Handling) rather than the AITG-APP catalogue. Recommend clarifying the naming or fixing the cross-reference so future readers know exactly what to consult. 4. The Contributors section still contains a placeholder — literal Technical content — specific suggestions5. Missing exploit categories. Three notable gaps relative to the AI-output threat surface:
6. SSRF example is dated. The 7. Testing methodology (Section 7) is thin. The payload contexts are useful but there is no systematic evaluation harness or metric. Consider adding: (a) a per-scenario expected-pass condition, (b) a corpus-level Attack Success Rate (ASR) definition, and (c) a suggested minimum sample size for defensible measurement. PR #69 (JEF) in this repo has some framing that could be borrowed for cross-consistency. 8. Mitigation table (Section 8.1) has a minor error. For the SQL row, the recommendation is "Parameterized queries (not encoding)" — correct — but it would be clearer to explicitly state "Never use string interpolation for SQL; always use parameter binding provided by the DB driver." The current phrasing risks being read as "encoding is optional for SQL," which is stronger than intended. 9. Defense-in-depth diagram (Section 8.2) is a serviceable ASCII flow. If the guide accepts SVG/PNG figures, this would render better as an image — the guide already uses figures elsewhere (e.g. AITG-APP-11 references Positives worth calling out
Happy to help further once you and the maintainers land on an integration direction. Thanks for the substantial contribution here. Suneet Malhotra |
Summary
Adds practical examples of web exploits enabled by unsafe AI outputs, addressing Issue #28.
Changes
Web_Exploits_Enabled_by_AI_Outputs.mdRelated Issue
Closes #28