OWASP Top 10 for Web Applications
The OWASP Top 10 (2021 and the 2025 update) with what each risk means, architectural controls and Spring/Java mitigations.
[!VERSION] OWASP published the Top 10:2025 in late 2025, updating the 2021 list. Category names below follow the 2025 release; check owasp.org for the final wording and the mapping from 2021.
OWASP Top 10:2025
| # | Risk | Architectural controls |
|---|---|---|
| A01 | Broken Access Control | Deny by default; server-side authorization per object; centralized policy; tests for IDOR |
| A02 | Security Misconfiguration | Hardened baselines, IaC with policy checks, no default credentials, minimal exposed endpoints |
| A03 | Software Supply Chain Failures | SBOMs, dependency scanning, signed artifacts (Sigstore), pinned versions, trusted registries, SLSA provenance |
| A04 | Cryptographic Failures | TLS everywhere, strong algorithms, managed keys, no custom crypto, hashing passwords with Argon2id/bcrypt |
| A05 | Injection | Parameterized queries, ORM safely, output encoding, input validation, CSP |
| A06 | Insecure Design | Threat modeling, secure design patterns, abuse cases, rate limits on business flows |
| A07 | Authentication Failures | MFA, standard IdPs, credential stuffing protection, secure session management |
| A08 | Software or Data Integrity Failures | Verify updates and deserialization, signed pipelines, integrity checks |
| A09 | Security Logging and Alerting Failures | Log security events, central SIEM, alerting, tamper-evident logs |
| A10 | Mishandling of Exceptional Conditions | Fail securely, consistent error handling, no sensitive data in errors, resource cleanup |
For reference, the 2021 list was: Broken Access Control, Cryptographic Failures, Injection, Insecure Design, Security Misconfiguration, Vulnerable and Outdated Components, Identification and Authentication Failures, Software and Data Integrity Failures, Security Logging and Monitoring Failures, Server-Side Request Forgery (SSRF).
Java examples
// Injection: always parameterize
jdbcClient.sql("SELECT * FROM orders WHERE customer_id = :cid AND status = :st")
.param("cid", customerId).param("st", status).query(Order.class).list();
// Password hashing
PasswordEncoder encoder = Argon2PasswordEncoder.defaultsForSpringSecurity_v5_8();
// Access control on object
Order order = orders.findById(id).filter(o -> o.ownerId().equals(currentUserId())).orElseThrow(NotFound::new);Secure SDLC integration
Threat modeling at design, SAST/SCA/secret scanning in CI, DAST against test environments, container and IaC scanning, security champions in teams, penetration tests before major releases, and the OWASP ASVS as the verification standard.
Interview questions and answers
Why is broken access control number one?
It is the most common serious flaw found in testing: applications check that a user is logged in but not whether they may access a specific object or function. Frameworks help with authentication, but object-level authorization is application logic that must be designed and tested.