Table of contents
Title
Table of contents
Title

API security

Updated

API security is the practice of protecting application programming interfaces from unauthorized access, data exposure, abuse and disruption, across their whole lifecycle. API security covers how an API proves who is calling, what that caller may reach, how much it can consume, and what comes back in the response.

In the systems Fluid Attacks assessed during 2025, the absence or evasion of an authentication mechanism concentrated 19.1% of all reported risk exposure, and improper authorization control for web services showed up in 47.6% of those systems. Neither is an exotic attack. One is a missing check; the other is a check that can be walked around.

This page covers what API security is and where it stops being application security, why it matters, how Fluid Attacks tests APIs, what the OWASP API Security Top 10 asks of you, how to run an API security test yourself, and what changes once AI agents start calling your endpoints.

What is API security?

API security is the set of controls and tests that keep an API from being used in ways its owner never intended. An API is an agreed set of rules through which one program requests data or an action from another: the client sends the request, the server answers, and each reachable address is an API endpoint.

The architectural style decides where API security controls sit, not whether you need them. A REST API exposes resources over HTTP and dominates the public internet. SOAP wraps requests in XML under stricter rules and is still common in banking. A GraphQL API answers at a single endpoint, returning exactly the fields the client asked for. RPC styles such as gRPC expose remote function calls. None is secure by default.

What makes API security its own discipline is that an API has no interface to hide behind: no screen quietly limiting what a person can click, no form constraining a request's shape. API security lives entirely on the server, enforced on every request, against a caller who may have read the documentation more carefully than the developers did.

API security and application security are not the same

API security is the part of application security where the attacker is not fighting the interface. They use the API exactly as designed, with values nobody considered. The application behind it can be well protected and the API still be the way in.


Application security

API security

Attack surface

Pages and flows a user can reach

Every endpoint, version and parameter, including ones no page links to

Identity

Sessions tied to a human login

Tokens, keys and machine identities passed on each request

Typical attack

A known exploit against a known component

Valid requests in an invalid order, or with someone else's identifier

What catches it

Signature and pattern matching

Logic that knows who owns the object being requested

That last row is the whole argument for testing API security separately. A scanner hunting known attack signatures sees an API attack as ordinary, well-formed HTTP traffic. Nothing is malformed. It is simply a request this caller should never have been allowed to make, and only the server knows that. API security tooling that cannot answer "who owns this object" is reading the wrong layer.

Why is API security important?

API security matters because an API is the shortest path between an outside request and the data behind it, with the fewest controls in between. When that path fails, it fails at machine speed and at the scale of the whole dataset.

Authentication and authorization are where the risk concentrates

Fluid Attacks' State of Attacks 2026 report, built on testing of client systems between January 1 and December 31 of 2025, ranks weaknesses by risk exposure rather than by count, and the top of that ranking is an API security story. Authentication mechanism absence or evasion took first place with 5,233,569.47 CVSSF units, across 8,515 vulnerabilities in 32.9% of systems. Improper authorization control for web services came second: 10,198 vulnerabilities, in 47.6% of systems. Server-side request forgery sat seventh, in 50.1% of them.

One figure deserves its own line. In running applications, the weakness Lack of data validation – Token ranked only fifth by total exposure but carried the list's second-highest mean exposure, 604.51 CVSSF per finding. That is a JWT whose signature is never verified: an attacker edits the token, or strips the signature, and the request is accepted.

Real breaches came from ordinary mistakes

In January 2023, T-Mobile disclosed that an attacker had pulled data on about 37 million accounts through a single API; the FCC's consent decree records that a misconfiguration let an outside actor reach that account data. In September 2022, Optus found that an attacker had accessed between 2.5 and 9.7 million customer records, and the Queensland Government's case study attributes the breach to an unsecured application interface that other devices and systems could reach.

Neither needed a novel exploit. One was a permissions setting, the other an endpoint reachable without credentials. That is the shape of most API security incidents: not clever, just unverified.

API security at Fluid Attacks

Fluid Attacks approaches API security with two techniques that cover different ground: an automated scanner and pentesters working by hand. Keeping them distinct matters, because the parts of an API carrying the most risk are the parts automation reaches last.

What we test, and under what rules

Our API security work is scoped and authorized in advance, against the client's own systems, with the targets and credentials the client provides. Assessment targets are source code, the running application and infrastructure. Automated scanning comes with the Essential plan; Pentesting as a Service (PTaaS), where a pentester authenticates and works through the application by hand, is exclusive to the Advanced plan.

What it looks like in practice

For APIs specifically, Fluid Attacks ships dast_api, a native binary for API security testing. It reads endpoints from a Postman collection, sends both the original requests and modified versions of them, and reports what it finds. Two of its design decisions are worth copying into your own API security process: it authenticates every run and will not scan without a credential, and an entry with no API specification stops the scan with an error rather than reporting a target it never tested.

Surface

Covered by

Notes

Unauthenticated HTTP endpoints

Automated scanner

Headers, DNS records, webhooks, WebSockets, and SSL connections for encryption suites, protocols and X509 certificates

Authenticated HTTP endpoints

Pentesters (PTaaS)

Requires credentials for each role under test

REST API, SOAP APIs

Pentesters (PTaaS)


GraphQL API, gRPC API

Pentesters (PTaaS)


OpenAPI, Swagger APIs

Pentesters (PTaaS)

The specification is the map of what gets tested

Postman collections

Pentesters (PTaaS) and dast_api

The only specification format dast_api reads

Attack surfaces documented for Fluid Attacks' DAST and PTaaS as of October 2026.

dast_api configuration file with base URL and Postman collection

The scanner starts from a Postman collection; without api_specs the run stops.

Scanner and pentester find different things

The two techniques do not produce the same findings in different volumes. They produce different findings. In 2025, Fluid Attacks' automated tools reported 88.4% of all vulnerabilities but 55.8% of total risk exposure, while pentesters reported 87% of the critical-severity findings. The average automated finding scored 15.5 CVSSF units; the average pentester finding scored 93.2, six times higher.

That gap is the problem in numbers. Volume is cheap to automate. The finding that lets someone read another customer's order is not.

Where our automated testing stops

Fluid Attacks' automated DAST covers unauthenticated HTTP endpoints. Authenticated endpoints, and REST, SOAP, GraphQL and gRPC APIs, are tested by pentesters under PTaaS, in the Advanced plan. The scanner is not a smaller version of the pentest; it reaches a different part of the API security surface.

The benchmark says the same thing from another angle. In Fluid Attacks' benchmark of 36 third-party AppSec tools against a dataset of 1,201 vulnerabilities, the best-performing automated scanner was Fluid Attacks' own, at 22.7% recall and 8.8% of total risk exposure. A pentester on the same dataset reached 89.6% recall at 100% precision. An API security program that treats a scan as the whole test is budgeting for the 22.7%.

Authorization is the control that decides the rest

Of every control an API can enforce, per-object authorization changes the outcome most. Fluid Attacks' Database records it as requirement 176, Restrict system objects, mapped to CWE-639, to OWASP API1, API3 and API5, and to ASVS 4.2.1. The matching weakness, 013, Insecure object reference, carries an estimated remediation time of 60 minutes and ships fix references for nine languages. Weakness 039, improper authorization control for web services, estimates 30 minutes: half an hour of work, on the category found in 47.6% of the systems we tested last year.

Fluid Attacks Database entry for improper web service authorization

Entry 039 in the Database, with its estimated remediation time and the four requirements that close it.

Go deeper: the dast_api documentation and the supported attack surfaces page.

The OWASP API Security Top 10

The OWASP API Security Top 10 is the reference classification for API security risks, maintained by the OWASP Foundation; the 2023 edition replaced the 2019 list. It is where most API security programs start. The table pairs every risk with the Fluid Attacks requirements that close it, so you can move from a category name to a testable control.

OWASP API risk (2023)

Fluid Attacks requirements

API1. Broken object level authorization

176, 265, 030, 033, 035, 095

API2. Broken authentication

228, 229, 264

API3. Broken object property level authorization

176, 181, 261, 266, 300, 375, 032, 062

API4. Unrestricted resource consumption

164, 173, 320, 342, 345, 072

API5. Broken function level authorization

176, 264, 320, 096

API6. Unrestricted access to sensitive business flows

265, 062

API7. Server-side request forgery

173, 324, 348

API8. Security misconfiguration

131, 134, 160, 266, 043, 062

API9. Improper inventory management

262, 266

API10. Unsafe consumption of APIs

173, 181, 262, 324

Full mapping, with each requirement's description, in the Fluid Attacks Database.

Three of these account for most of what goes wrong in API security practice. API1, broken object level authorization, is where a caller swaps an identifier and the server hands over an object belonging to someone else. API2 is the endpoint that accepts a request without a valid session, or whose API authentication can be bypassed. API7, server-side request forgery, turns the API into the attacker's proxy: as Jonathan Armas, security analyst at Fluid Attacks, writes in his hands-on SSRF demonstration, it "occurs when an attacker can create requests from the vulnerable server" to the internet or intranet. A parameter accepting a URL becomes a route to cloud metadata services and internal hosts.

How to test API security

An API security test follows the API's own structure: find every endpoint, then challenge each one on identity, permission, input and sequence. The five steps below are the order we work in. NIST's SP 800-228, Guidelines for API Protection for Cloud-Native Systems, published in 2025 and updated in March 2026, splits its recommendations the same way, across the pre-runtime and runtime stages of the API lifecycle.

Inventory first, because you cannot test what you do not know about

Start from the specification: an OpenAPI or Swagger file, or a Postman collection. Then look for what it leaves out. A shadow API is an endpoint in production that no document mentions; a zombie API is an old version nobody decommissioned. Both answer requests, and both predate the API security controls the current version enforces. Hunt for shadow API endpoints in DNS records, gateway logs, client-side bundles and old release branches.

Test authentication, then test it again as a different role

Call every API endpoint with no credential at all and record what answers. Then repeat with a valid credential for a low-privilege role. API authentication failures are rarely subtle once you look for them: an endpoint that forgot the middleware, a token whose signature is never verified, a logout that invalidates nothing.

Test BOLA by changing the identifier

This is the highest-yield test in API security, and it needs no tooling beyond a proxy.

  1. User A calls GET /api/orders/4517 and the server returns their own order.

  2. User A calls GET /api/orders/4518, an order belonging to user B.

  3. If the response is the order rather than a 403, API authorization is broken at the object level.

Server validating object ownership versus returning another user's order

The difference between a safe endpoint and one vulnerable to BOLA is a single server-side check. Own work.

Repeat it for write operations, usually less guarded than reads, and for object properties: an endpoint may correctly refuse to show someone else's record while accepting a request-body field the caller should not be able to set.

Test GraphQL on its own terms

A GraphQL API cannot be tested like a REST one. There is a single endpoint, so per-route rate limiting means little, and one small, deeply nested request can make the server do an enormous amount of work. Check whether introspection is exposed in production, whether query depth and breadth are bounded, whether authorization is enforced per field and inside resolvers rather than only at the entry point, and whether batching lets an attacker fold hundreds of operations into a single call.

Test the sequence, not just the request

This is the category tooling handles worst, and the reason an API security assessment is not finished when a scan completes. Every request is valid and authorized on its own, but the order they arrive in produces something the business never intended: a discount applied twice, a transfer that clears before the balance check, a signup completed without verification. Finding these takes an understanding of what the application is for, which is why this part of API security comes out of manual penetration testing rather than a scan.

API security best practices

The controls that prevent most of the above are unglamorous and well understood. Fluid Attacks' guidance on API security best practices groups them into a few habits:

  • Keep a documented API registry: every endpoint, version and owner, so retiring a version is a tracked event rather than an oversight.

  • Authenticate with standard protocols: OAuth 2.0, OpenID Connect or managed keys, with short-lived credentials and a working revocation path.

  • Authorize per object, on the server: never trust an identifier because the client sent it, and never enforce a permission only in the front end.

  • Validate every input and bound every response: reject what does not fit the schema, return only the fields the client needs.

  • Put an API gateway in front: a gateway filters requests, applies rate limits and manages keys, which blunts enumeration even when something behind it is imperfect.

  • Encrypt in transit, and vet the APIs you consume: assess a provider's security posture before integrating its API, because its weaknesses become yours.

None of these API security practices is new. What changes between organizations is whether anyone verifies they still hold after the next release.

API security for AI agents and MCP

AI agents turn APIs into an execution layer, and that changes what API security has to account for. An agent holding a valid token is, to your API, an authorized caller acting far faster and more often than the human it stands in for.

Fluid Attacks' analysis of the Model Context Protocol identifies the failure modes. MCP servers open direct paths between models and sensitive enterprise systems, and they tend to request broad permission scopes, so one compromise reaches further than it should. Passing a token straight through to a downstream API without validating its audience skips controls such as rate limiting and makes the call hard to audit. MCP leans on OAuth conventions, so it inherits every OAuth implementation mistake.

API security for agents uses the same controls, applied on the assumption that the caller is a machine: scope tokens narrowly, validate audience at every hop, log per agent rather than per user, and keep API authorization enforced per object no matter how legitimate the identity looks.

Conclusions

API security fails in two places far more often than anywhere else: the check that establishes who is calling, and the check that decides whether this caller may touch this object. Fluid Attacks' 2025 data puts both at the top of the risk ranking, and the public breaches that made the news came from the same pairing.

The useful conclusion is about how you test API security, not how you build it. Automated scanning covers breadth cheaply and finds most vulnerabilities by count. It does not find the ones that matter most: in 2025, pentesters reported 87% of the critical-severity findings. An API security program that runs a scanner and stops there has tested the easy half.

Frequently asked questions

What is the difference between API security and application security?

API security is a subset of application security with a different attack pattern. Application security often defends against known exploits aimed at known components. API security has to handle well-formed, authorized-looking requests carrying the wrong identifier, which signature-based tooling reads as normal traffic.

What is BOLA, and why is it first on the OWASP API Security Top 10?

Broken object level authorization is a server failing to check that the caller owns the object they requested. It ranks first because it is trivial to exploit and it scales: once one identifier works, the rest of the dataset usually does too. Fluid Attacks records it as weakness 013 and estimates 60 minutes to remediate.

How do you test an API for security vulnerabilities?

API security testing starts with an inventory built from the OpenAPI, Swagger or Postman specification, plus the endpoints it omits. Call everything unauthenticated, then as a low-privilege role. Change object identifiers to test authorization. Check GraphQL for introspection, query depth and per-field authorization. Finish with business-logic testing, which needs a human.

Can an automated scanner find API business logic flaws?

Mostly no, and the numbers show the gap. In Fluid Attacks' benchmark of 36 third-party AppSec tools against a dataset of 1,201 vulnerabilities, the best automated scanner reached 22.7% recall and 8.8% of total risk exposure, while a pentester reached 89.6% recall at 100% precision. Logic flaws are made of valid requests, so there is no signature to match.

Does Fluid Attacks do API security testing?

Yes. dast_api, a native binary, reads endpoints from a Postman collection and sends modified requests to find vulnerabilities automatically. REST, SOAP, GraphQL and gRPC APIs, and any authenticated endpoint, are covered by pentesters under PTaaS in the Advanced plan, following OpenAPI, Swagger or Postman specifications.

Test the endpoints before someone else enumerates them

Our scanners and pentesters run API security testing the way an attacker would, from the specification to the forgotten version nobody documented. Start free trial · Contact us.

Get started with Fluid Attacks' AppSec solution right now

Reduce risk without slowing delivery

Fast and accurate results from one continuous security program powered by AI, scanners, and pentesters.

Reduce risk without slowing delivery

Fast and accurate results from one continuous security program powered by AI, scanners, and pentesters.

Reduce risk without slowing delivery

Fast and accurate results from one continuous security program powered by AI, scanners, and pentesters.