APIs are more exposed than web applications because no interface constrains usage. Authorisation, rate limiting, version management.
API security is a distinct topic because the protective layer a user interface provides is absent. In a web application the interface constrains what can be requested; with an API the client can send anything, in any order.
The most common and most serious flaw. The API validates the token but does not check whether that user is entitled to the requested object.
GET /api/orders/8842 returns the order even when it belongs to someone else. Automated tools cannot find this, because the request is technically valid.
What to do: server-side authorisation on every object access. Trust the identity derived from the token, not the identifier sent by the client.
The API returns the full object while the client displays only part of it. The rest sits in the response for anyone to read.
Typical case: the user profile endpoint returns the password hash, internal identifiers or other users' data.
What to do: compose responses explicitly, field by field. Do not serialise the entire database object.
Without limits an endpoint can be used for brute force, scraping or denial of service. Login and password reset endpoints are the most sensitive.
What to do: limits per user and per IP, with different thresholds on different endpoints.
The API accepts every field the client sends and writes it into the object. The attacker adds "role": "admin" and receives it.
What to do: an allow-list of modifiable fields. Anything not explicitly permitted must be ignored.
v2 arrived alongside /api/v1, but v1 still runs because a few clients use it. The old version still carries the old flaws.
What to do: a version inventory, a retirement plan, and switching off unused versions. Access logs reveal whether anyone genuinely still uses them.
Short lifetime. Access tokens should be short-lived and renewable with a refresh token. A never-expiring token works just as well once lost.
Scope restriction. A token should authorise only what the client needs, not everything.
Not in the URL. Send tokens in headers, because URLs appear in logs and referrers.
Revocability. There must be a way to invalidate a token immediately on compromise.
Our IT security services and penetration testing both extend to the API layer.
The most important OWASP Top 10 items explained: broken access control, injection, authentication. What a…
Professional penetration testing, security audits and SOC services from ARLITECH, identify vulnerabilities…
You do not need a full DevSecOps programme. Which five steps deliver the most protection in development,…
Our specialists are happy to discuss what this means in your organisation's environment.