API Security
API Security
APIs are where most modern attacks land, which is why OWASP maintains a dedicated API Security Top 10. The surface is broad and easy to under-protect: inputs that are not validated, cross-origin rules that are too loose, GraphQL left introspectable, and old or internal endpoints that were never meant to be public.
Missing Input Validation
OWASP API8:2023- What it is
- Endpoints accept input without validating its type, shape, or bounds.
- Why it matters
- Downstream injection, logic errors, and denial of service.
- How to check
- Validate every input against a strict schema at the boundary.
CORS Misconfiguration
OWASP API8:2023- What it is
- Cross-origin resource sharing allows any origin, especially together with credentials.
- Why it matters
- Malicious sites read authenticated responses on behalf of the victim.
- How to check
- Allow only trusted origins and avoid combining wildcards with credentials.
GraphQL Exposure
OWASP API4:2023- What it is
- Introspection is enabled in production, there is no query depth or complexity limit, or field-level authorization is missing.
- Why it matters
- Schema disclosure, expensive query denial of service, and unauthorized field access.
- How to check
- Disable introspection in production, limit depth and complexity, and authorize at the field level.
Shadow & Undocumented Endpoints
OWASP API9:2023- What it is
- Old, debug, or internal endpoints remain live and unprotected.
- Why it matters
- An un-inventoried endpoint becomes the weakest point in the system.
- How to check
- Maintain an inventory of every endpoint and retire or protect the ones that should not be public.
Related coverage
Check your code for api security
Tethlyn Audit checks your codebase for api security and more, then ranks each finding by real exploitability and data sensitivity.