OWASP Top 10 2025 Audit
This skill checks a real project against the ten categories of the OWASP Top 10 2025. It does not only look at code: in the 2025 edition, Security Misconfiguration (A02) and Software Supply Chain Failures (A03) rank 2nd and 3rd, and those risks live mostly in configuration files, dependency manifests and the build pipeline. An audit that reads only the code misses two of the top three risks.
The expected result is a report the user can read and act on right away: a table of the ten categories, then each issue with its evidence, severity and a concrete fix. The skill proposes fixes but does not modify the code unless the user explicitly asks.
Write the report in the user's language.
The ten categories (2025 edition)
| Code | Category | Change from 2021 |
|---|---|---|
| A01 | Broken Access Control | Still #1; now includes SSRF |
| A02 | Security Misconfiguration | Up from #5 to #2 |
| A03 | Software Supply Chain Failures | New; expands "Vulnerable and Outdated Components" to dependencies, build systems and distribution |
| A04 | Cryptographic Failures | Down from #2 to #4 |
| A05 | Injection | Down from #3 to #5; includes XSS |
| A06 | Insecure Design | Down from #4 to #6 |
| A07 | Authentication Failures | Renamed |
| A08 | Software or Data Integrity Failures | Unchanged; artifact integrity and trust boundaries |
| A09 | Security Logging & Alerting Failures | Renamed to stress alerting |
| A10 | Mishandling of Exceptional Conditions | New: improper error handling, logic errors, failing open |
Workflow
0. Check that the edition is still the latest
This skill was written for the 2025 edition. OWASP publishes a new edition roughly every four years (2017, 2021, 2025…). If a web search tool is available, run a quick search ("OWASP Top 10 latest edition") before the audit:
- If nothing newer than 2025 exists, continue normally.
- If a newer edition exists, say so in one line at the top of the report, fetch the new list from the official OWASP site and classify the issues according to it. The checks below remain valid: most risks carry over from one edition to the next under a different number or name. Also mention that the skill should be updated.
- Without web search, use the 2025 edition and state in the scope that the report follows the 2025 edition.
1. Define the scope
Start with a quick inventory so you know what to read and miss nothing:
- Languages and frameworks (Express, Next.js, Django, Flask, FastAPI, Laravel, Symfony, Spring, Rails, ASP.NET…). The framework matters: many protections (template escaping, CSRF, parameterized ORM queries) exist by default, and a flaw often comes from bypassing them.
- Entry points: routes, controllers, API endpoints, GraphQL resolvers, jobs, webhooks, CLIs.
- Configuration:
.env*,settings.py,config/*.yml|json,application.properties,appsettings.json,nginx.conf,Dockerfile,docker-compose.yml, Kubernetes manifests, Terraform,next.config.js,vercel.json. - Dependencies:
package.json+ lockfile,requirements*.txt/pyproject.toml/poetry.lock,composer.json/.lock,pom.xml/build.gradle,Gemfile.lock,go.mod,Cargo.toml,.npmrc/pip.conf. - CI/CD:
.github/workflows/*,.gitlab-ci.yml,Jenkinsfile, deployment scripts.
If the user only gave a code snippet, audit what is there and state clearly in the report which categories could not be checked for lack of configuration or manifests. That is more honest than a misleading "OK".
On a large repository, prioritize: authentication, authorization, endpoints handling sensitive data, file uploads, payments, administration. Say what you left aside.
2. Check each category
For each category, look actively using the pointers below (grep, reading key files). The lists are not exhaustive: they are starting points to guide the reading.
A01 — Access control (+ SSRF)
- Sensitive routes or endpoints without an authentication or role middleware/decorator; an admin route protected only in the UI.
- IDOR: an object loaded by an identifier from the request (
req.params.id,request.GET['id']) without checking that it belongs to the logged-in user. - Role or permissions read from a client-controlled field (body, unsigned cookie, header, hidden field).
- Mass assignment:
Model.update(req.body),**request.data,$request->all()without an allowlist of fields. - Path traversal: a file path built from user input without normalization or a root-directory check.
- CORS:
Access-Control-Allow-Origin: *with cookies or credentials, or a reflected origin without an allowlist. - SSRF: an HTTP request to a user-supplied URL (
fetch(url),requests.get(url),file_get_contents($url)) without an allowlist or blocking of internal addresses (169.254.169.254, localhost, private ranges). - No CSRF protection on state-changing actions when authentication relies on cookies.
A02 — Security misconfiguration
- Debug mode in production:
DEBUG = True,app.run(debug=True),APP_DEBUG=true, detailed error traces returned to the client. - Default or sample secrets:
SECRET_KEY = 'changeme', default admin passwords, a committed.env. - Missing security headers (no Helmet or equivalent): CSP, HSTS,
X-Content-Type-Options,frame-ancestors/X-Frame-Options. - Session cookies without
Secure,HttpOnlyorSameSite. ALLOWED_HOSTS = ['*'], directory listing enabled, admin console or Swagger exposed without protection.- Containers: running as root,
:latestimage, database ports published on0.0.0.0, secrets inENVorARGin the Dockerfile. - Cloud and IaC: public bucket, security group open to
0.0.0.0/0on admin ports. - XML: parsers with external entities enabled (XXE).
A03 — Software supply chain
- No lockfile, or an uncommitted lockfile; unpinned versions (
*,latest, very wide ranges) for critical packages. - Versions known to be vulnerable or abandoned. If a tool is available and the network allows it, run it:
npm audit --json,pip-audit,composer audit,osv-scanner,mvn dependency-check. Otherwise, report what you know about a specific version, stating that it comes from your own knowledge and must be confirmed against a vulnerability database. Never invent a CVE number. - Suspicious package names (typosquatting, a misspelling of a popular package), dependencies installed from a Git URL or tarball, an unofficial registry in
.npmrc/pip.conf,--extra-index-url(dependency confusion risk). - Unexpected
postinstall/preinstallscripts. - CI: third-party actions referenced by a branch or mutable tag instead of a SHA,
curl … | shin the build, overly broadGITHUB_TOKENpermissions,pull_request_targetrunning a PR's code.
A04 — Cryptography
- Passwords hashed with MD5, SHA-1 or SHA-256 without salt or stretching, instead of bcrypt, scrypt or Argon2; passwords stored in plaintext or reversibly encrypted.
- Weak algorithms: DES, RC4, AES in ECB mode, fixed or reused IVs, hard-coded keys.
- Non-cryptographic randomness for tokens:
Math.random(),random.random(),rand(). - TLS disabled or unverified:
verify=False,rejectUnauthorized: false,NODE_TLS_REJECT_UNAUTHORIZED=0, plain HTTP for sensitive data. - Secrets in code: API keys, tokens, private keys. In the report, mask the value (
sk_live_****abcd) and recommend revoking it, not just removing it from the code, since it stays in the Git history.
A05 — Injection (including XSS)
- SQL or NoSQL built by concatenation or interpolation:
"SELECT … " + id, f-strings,${}inquery(), ORMraw()/extra(), MongoDB$whereor a query object taken straight from the body. - System commands:
exec,child_process.exec,os.system,subprocess(..., shell=True),shell_exec,Runtime.execwith user input. - XSS:
innerHTML,dangerouslySetInnerHTML,v-html,|safe,{!! !!},mark_safe, template escaping disabled, HTML responses built by concatenation. eval,new Function, unsafe deserialization (pickle.loads,yaml.loadwithout SafeLoader,unserialize,ObjectInputStream) of external data.- Server-side template injection (SSTI), LDAP, XPath, HTTP header injection (CRLF).
- LLM-backed applications: prompts built from untrusted data and model output executed or rendered without checks (prompt injection).
A06 — Insecure design This kind of risk rarely shows up line by line. Look at the business logic:
- No rate limiting on login, password reset, SMS or email sending, expensive endpoints.
- Bypassable business flows: payment validated client-side, price or quantity sent by the client and accepted as is, skippable steps, negative quantities.
- Security questions as a recovery method, no tenant separation in a multi-tenant app.
- Then ask the user at most 3 to 5 targeted design questions about what the code does not show (see step 4).
A07 — Authentication
- No limit or lockout after repeated failed logins; no MFA available for admin accounts.
- No password policy; messages that reveal whether an account exists.
- Sessions: identifier not regenerated after login, no expiry, logout that does not invalidate the session server-side.
- JWT:
alg: noneaccepted, weak or hard-coded secret, signature not verified (jwt.decodewithout verification), no expiry, token stored inlocalStoragewhile the app has XSS. - Predictable, non-expiring or reusable reset tokens; non-constant-time secret comparison.
A08 — Software and data integrity
- Scripts loaded from a CDN without an
integrityattribute (SRI). - Updates, plugins or artifacts downloaded and executed without signature or checksum verification.
- Webhooks accepted without verifying their signature (Stripe, GitHub…).
- Serialized data, cookies or tokens trusted only because they come from the client, without a signature or MAC.
- Pipeline: an artifact built in one job and deployed from another without an integrity check; build cache shared between untrusted branches.
A09 — Logging and alerting
- Security events not logged: failed logins, access denials, permission changes, admin actions.
- Sensitive data in logs: passwords, tokens, card numbers, full request bodies.
- Log injection: user input written as is (line breaks).
- No alerting or monitoring planned (nothing sent to an alerting tool, errors simply swallowed). If the monitoring configuration is not in the repository, mark the category "to confirm" rather than as an issue.
A10 — Mishandling of exceptional conditions
- Failing open: a
try/catchthat lets the request through on error (catch { return true },except: passin an authorization check, a permissive default when a permissions service does not respond). - Exceptions silently swallowed (
catch {},except: pass) in sensitive paths. - Error messages or stack traces returned to the client.
- Resources not released on error (transactions not rolled back, files or locks not released), inconsistent partial states.
- Missing limits: request or file size, JSON depth, regular expressions vulnerable to ReDoS, missing timeouts on external calls.
- Unhandled rejected promises, logic errors on edge cases (null, negative, empty, very large values).
3. Confirm each issue before reporting it
A report full of false positives wastes time and the team's trust. Before listing an issue:
- Trace the data flow: does the data really come from the user? Does a global middleware, upstream validation or a framework default already neutralize it?
- Check that the code is reachable (not dead code, tests or a documentation example). Test files and fixtures may contain fake secrets: report them only if they look like real credentials.
- If you are unsure, keep the issue but mark it "To confirm" and explain what should be checked.
Describe the impact in one sentence (what an attacker could achieve), without writing a ready-to-use exploit payload: the goal is to fix, not to attack.
4. Design questions (A06)
After the analysis, add a short section with 3 to 5 questions at most, chosen based on what you saw. They cover what the code cannot show: threat model, sensitive data handled, tenant separation, backups, production monitoring and alerting, production secrets management, dependency update process. No generic questionnaire: each question must relate to this project.
5. Severity
Use four levels and justify each in one sentence:
- Critical: remotely exploitable without authentication, with serious impact (code execution, SQL injection on a public endpoint, authentication bypass, exposed production secret).
- High: exploitable with a regular account or under a common condition (IDOR, stored XSS, SSRF, weak password hashing).
- Medium: requires an extra condition or has limited impact (missing headers, reflected XSS with partial protections, no rate limiting).
- Low: best practice or defense in depth (version disclosure, incomplete logging).
Report format
Use this structure:
# OWASP Top 10 2025 Audit — <project name>
**Scope:** <what was analyzed: languages, folders, config files, manifests, CI>
**Out of scope / not verified:** <what was missing or left aside>
## Summary
<2 to 4 sentences: overall risk level, the 2 or 3 issues to fix first.>
| Category | Status | Issues |
|---|---|---|
| A01 Broken Access Control | ❌ Issue | 2 (1 critical, 1 high) |
| A02 Security Misconfiguration | ⚠️ To confirm | 1 |
| A03 Software Supply Chain Failures | ✅ Nothing found | 0 |
| … | | |
| A10 Mishandling of Exceptional Conditions | ➖ Not verifiable | — |
Statuses: ❌ Confirmed issue · ⚠️ To confirm · ✅ Nothing found in scope · ➖ Not verifiable (files missing)
## Detailed findings
<Sorted from most to least severe.>
### [A05-1] SQL injection in product search — Critical
- **Location:** `src/routes/products.js:42`
- **Evidence:**
```js
db.query(`SELECT * FROM products WHERE name LIKE '%${req.query.q}%'`)
- Impact: any visitor can read or modify the database.
- Fix:
db.query('SELECT * FROM products WHERE name LIKE ?', [`%${req.query.q}%`])
Design questions
- …
Next steps
<3 to 5 actions in priority order, and the tools to run to go further (dependency scanner, DAST, penetration test) when relevant.>
A few rules for this report:
- All ten categories always appear in the table, even when empty, so the reader sees what was covered.
- "Nothing found" does not mean "secure": say so in one line in the summary if most statuses are ✅.
- The fix is real code adapted to the project, in its language and framework, not generic advice.
- An issue present in several places gets a single entry listing all locations.
- If the user then asks you to apply the fixes, apply them one at a time and summarize what changed.