Explore our new Cybersecurity Terms Glossary, explained by our experts.
Cybersecurity Terms Glossary
REST API security covers authentication, per-object authorisation, input validation, and resource limits for interfaces that have no user interface to hide behind.

What Is REST API Security?
An API has no user interface to disguise its structure. Every endpoint, parameter, and object identifier is addressable directly, and the client enforcing rules in a browser is irrelevant because an attacker never uses it. REST API security is therefore mostly about doing a small number of things properly on the server: proving who is calling, deciding what that caller may touch, validating what they send, and limiting how much they can consume.
The OWASP API Security Top 10, updated in 2023, is unusual among such lists in how heavily it weights one theme. Three of the ten entries are authorisation failures: broken object-level authorisation, broken object property-level authorisation, and broken function-level authorisation. Together they describe an API that correctly identifies the caller and then fails to check what that caller is entitled to. The single most common finding in API testing is IDOR, which is the first of those three.
The 2023 revision added two entries worth noting. Unrestricted access to sensitive business flows covers automation abuse, such as bulk purchasing of limited stock, where no individual request is improper. Unsafe consumption of third-party APIs covers the trust placed in data returned by an upstream service, which is frequently validated far less rigorously than data from a user.
Use an established framework rather than inventing one. OAuth 2.0 with OpenID Connect for user-facing access, the client credentials grant for service-to-service calls, and mutual TLS where both ends can hold certificates. API keys identify an application, not a person, and should never be the only control on anything sensitive.
Where JSON Web Tokens are used, the implementation details decide whether they help:
none algorithm and key confusion attacks succeed.Tokens belong in the request header, never in a URL, where they are recorded in access logs, proxy logs, browser history, and referrer headers.
Improper inventory management reaches the Top 10 because it is so common. Organisations run API versions nobody remembers deploying: a /v1 left live after /v2 shipped, a staging host reachable from the internet, a partner integration built years ago by a team that has moved on. Older versions frequently lack the controls added later, so an attacker simply uses the one that was never updated.
The remedy is an inventory derived from evidence rather than from documentation. Gateway logs, DNS records, certificate transparency data, and traffic analysis all reveal endpoints that no specification mentions. Each one then needs an owner, a retirement date, or the same controls as the current version.
On 19 January 2023, T-Mobile US reported that an attacker had used a single API to retrieve data on approximately 37 million customer accounts, with access beginning around 25 November 2022 and continuing undetected for roughly six weeks. The interface was working as built; what was missing was any limit on how much one caller could retrieve and any alerting on a pattern that was far outside normal use. Under UK GDPR a comparable failure would require notification to the ICO within 72 hours of discovery, and discovery is the part that monitoring determines. Our web application security testing covers REST APIs with a full role and object matrix rather than a scan of the documented endpoints.
No, though it is a useful layer. A gateway handles authentication, transport security, schema validation, and rate limiting well, which removes a lot of noise. It cannot decide whether this particular caller is entitled to this particular record, because that depends on application data. Object-level authorisation has to live in the service, close to the query.
They are different rather than better. Tokens scale without shared session state, which suits distributed services, and that same property makes revocation hard: a stolen token remains valid until it expires. Session cookies can be invalidated instantly server side. Choose based on your architecture, and if you use tokens, keep them short-lived with revocable refresh tokens.
Work from evidence rather than documentation. Gateway and load balancer logs show what is actually being called, DNS records and certificate transparency logs reveal hosts, and mobile application bundles often contain endpoints no web client uses. Compare the result with your specification; the gap is usually old versions, partner integrations, and environments that were meant to be internal.
It should be secured, which many are not. Internal services are reached through server-side request forgery, a compromised container, a supplier connection, or an employee’s browser, so network position is a weak boundary. Apply authentication between services, ideally mutual TLS, and enforce authorisation on the data, treating the internal network as untrusted.
You May Be Interested In These
We use a few cookies that are needed to make this website work, and they are always on. We would also like to set analytics cookies, to see which pages are useful; functional cookies, so that our live chat works; and advertising cookies, to measure our campaigns. We will not set any of those until you say yes, and you can change your mind at any time from the Cookie Settings link in the footer.
Choose the cookies you are happy for us to use. Strictly necessary cookies are always on; everything else is off until you turn it on.
These cookies keep the website working: they hold your security checks, your form submissions and the choice you make here. The site cannot run without them, so they are always on.
These let our live chat open and remember your conversation, and let the newsletter sign-up work. Switch them off and the chat window will not appear.
These tell us which pages are read and how people find us, so that we can improve the site. The reports are about groups of visitors, never about you personally.
These let us measure our advertising and show you our adverts on other websites, such as LinkedIn, Google and Meta. Switch them off and you will still see adverts, but they will be less relevant.