Runnable local fixtures for common web and API security flaws: vulnerable mode, fixed mode, verifier, recorded run.
Small local fixtures that reproduce common web and API flaws, each with a vulnerable mode, a fixed mode, a verifier and a recorded run.
| Flaw | Folder | What the run shows | Write-up |
|---|---|---|---|
| OWASP API Top 10 | owasp-api-top-10 | 12-request checklist against a vulnerable and a fixed toy API | Write-up |
| IDOR | idor-vulnerability | a second user lists, edits and deletes another user's invoices; UUIDs alone do not help | Write-up |
| SQL injection | sql-injection | login bypass, UNION read and second-order injection, closed by parameterized queries and a sort allowlist | Write-up |
| SSRF | ssrf | a URL preview leaks an internal secret; a hostname block is bypassed by decimal IP and a redirect | Write-up |
| Timing attack | timing-attack | a token check that stops at the first wrong byte leaks characters; hmac.compare_digest fixes it | Write-up |
| Clickjacking | clickjacking | a hidden delete button clicked through a decoy; frame headers make Chromium block the frame | Write-up |
| Row level security | row-level-security | three PostgreSQL RLS mistakes on a throwaway local cluster, each retested after the fix | Write-up |
| security.txt | security-txt | a Python checker flags five defective files by rule and passes the corrected one | Write-up |
| Path traversal | path-traversal | ../, encoded and absolute paths read files; stripping dots fails, a real-path check holds | Write-up |
| Session fixation | session-fixation | a planted session ID survives login; issuing a new ID at login fixes it | Write-up |
| API rate limiting | api-rate-limiting | a 5-attempt login limit is bypassed by changing X-Forwarded-For; a fixed limiter key returns 429 | Write-up |
| Broken access control | broken-access-control | a normal user reaches admin functions through a hidden route, a role header and a DELETE method | Write-up |
| GraphQL introspection | graphql-introspection | introspection off still leaves an admin field callable; a resolver check stops the read | Write-up |
| 2FA bypass | 2fa-bypass | a password-only session, unlimited code guesses and one user's code finishing another's login | Write-up |
| CSRF and SameSite | csrf-samesite | a forged cross-site POST changes an email; a token and Origin check block it | Write-up |
| Open redirect | open-redirect | a ?next= redirect to an attacker host; two naive fixes are bypassed, a parsed path check holds | Write-up |
| Mass assignment | mass-assignment | a user sets role and credit through a profile endpoint; a per-role allowlist closes it | Write-up |
| Tenant isolation | tenant-isolation | a client-supplied tenant_id, a shared cache key and an unchecked export job leak across tenants | Write-up |
| Race condition | race-condition | 16 concurrent requests redeem one coupon up to 16 times; one atomic SQL update fixes it | Write-up |
| Host header injection | host-header-injection | a forged Host or X-Forwarded-Host puts the victim's reset token on an attacker domain | Write-up |
| API authorization testing | api-authorization-testing | a cross-account read with eight real requests, then the server-side check | Write-up |
The security-txt folder has no server. Its checker runs against defective and corrected files instead.
Each folder is self-contained. Pick one and run its verifier:
cd idor-vulnerability
python3 verify.py --output rerun
The verifier starts the fixture on loopback, sends the requests, writes the responses and a results.json, then stops the server. It refuses an output folder that already exists. Exit code 0 means every case matched its expected result. That includes the vulnerable cases, so it does not mean the vulnerable mode is safe. The recorded-run/ folder in each fixture holds the run we published, and SHA256SUMS lists hashes of the files. Each README.txt has the details for that fixture.
Most fixtures need Python 3.9 or newer (standard library only) and curl in your PATH. Four folders need more:
row-level-security needs a local PostgreSQL install with initdb, postgres, pg_isready and psql. It was recorded with PostgreSQL 16.15. The verifier creates a throwaway cluster in a temp folder on a unix socket and deletes it at the end.graphql-introspection builds a temporary virtual environment and installs graphql-core==3.2.14 from PyPI, so it needs network access once. Nothing is installed globally.clickjacking and csrf-samesite have an optional browser check. It needs Node.js, the Playwright package and a Chromium build, which these folders do not install. Without it, only the curl cases run. See each README.txt for the flags.These fixtures are intentionally vulnerable. They bind to 127.0.0.1, and every identity, token and record in them is synthetic. Run them only on your own machine and never expose their ports to a network. Do not point the techniques at systems you do not own or have no written permission to test. See the acceptable use policy: https://excessionlabs.ai/aup/