APIs Are the New Attack Surface
Every mobile app, SPA, and microservice communicates via APIs. They're everywhere — and they're consistently under-secured compared to traditional web frontends.
The OWASP API Security Top 10 exists for a reason. API vulnerabilities are responsible for a disproportionate share of high-severity breaches. This checklist covers everything you need to lock down your endpoints.
1. Authentication
Every endpoint needs authentication (unless intentionally public). Most API breaches start with missing or broken auth.
Use industry standards:
JWT validation checklist:
2. Authorization — Don't Confuse with Authentication
Authentication confirms *who* the user is. Authorization confirms *what* they're allowed to do.
BOLA (Broken Object Level Authorization) is the #1 API vulnerability. Always verify that the authenticated user owns or has permission to access the resource they're requesting.
Rule: Never trust a resource identifier (ID) from the request without verifying the authenticated user has access to it.
3. Rate Limiting
Without rate limiting, your API is vulnerable to brute force, credential stuffing, enumeration attacks, and DoS from runaway clients.
Limits to implement:
Add exponential backoff for repeated failures. Consider IP-based and user-based limits separately.
4. Input Validation and Sanitization
Never trust user input. Validate everything — shape, type, length, and content.
Validation rules:
5. HTTPS Everywhere + HSTS
All API traffic must be encrypted. HTTP is not acceptable for any endpoint that handles credentials or sensitive data.
TLS configuration checklist:
6. CORS Configuration
Misconfigured CORS allows malicious websites to make authenticated requests to your API on behalf of logged-in users.
Rules:
7. Sensitive Data Exposure
APIs often return more data than the client needs. Over-fetching exposes fields that should never leave the server.
Field-level checklist:
8. Error Handling
Verbose errors are a gift to attackers. Stack traces reveal file paths, library versions, database schemas, and internal architecture.
Rule: Log the full error server-side. Return only a generic message to the client in production. Include error codes (not messages) for client-side handling.
9. Security Headers for APIs
Even JSON APIs benefit from security headers.
Always include:
10. Logging and Monitoring
You can't defend what you can't see. Proper API logging is the difference between detecting a breach in minutes vs. finding out months later.
Log every:
The Quick External Audit
After implementing these controls, verify them externally. Run a scan against your API domain and check:
VulnScan.pro's Full Scan runs nuclei against your API endpoints with templates specifically targeting API vulnerabilities — auth bypass, exposed documentation, BOLA patterns, and more.
Check your API security posture today. Run a Full Scan and get a detailed report in under 30 minutes.