When most people picture a cyberattack on a website or app, they imagine someone breaking in through the login page or the front end customers see. In reality, a growing share of attacks skip the front end entirely and go straight for the APIs behind it.
APIs, or application programming interfaces, are how modern software talks to other software. Your mobile app uses them to fetch account details, your website chatbot uses them to look up orders or book appointments, and your AI tools use them to pull information from your CRM and knowledge base. Each of those connections is a door into your data, and they’re often far less well guarded than the front door.
This guide explains why APIs have become such a common weak point, what API penetration testing actually covers, how the OWASP API Security Top 10 fits in, and what a good test looks like.
Why APIs Are the Weak Point
APIs have a few characteristics that make them particularly attractive to attackers.
They’re built to be used by machines, not people
A website shows users only what they need to see, but the API behind it often returns much more, trusting the app or website to filter out what shouldn’t be displayed. An attacker who talks to the API directly sees everything it returns.
They’re often designed around the app, not around security
Developers build APIs to make an app or integration work, and it’s easy to assume that because the app only ever asks for a user’s own data, the API doesn’t need to check. Attackers don’t use the app, though. They send their own requests.
There are more of them than anyone realises
Every new feature, integration, partner connection and test environment can add new endpoints. Old versions are often left running after a new one is released, and nobody remembers they’re there.
They’re increasingly connected to AI
Chatbots and AI assistants are only useful because they can reach real data and take real actions, such as checking an order, updating a booking or searching internal documents. That means an API sitting behind a chatbot can be reached by anyone who can type a message, and if the chatbot has broader permissions than it needs, a cleverly worded prompt may be enough to make it misuse them.
A real-world example
Perhaps the clearest illustration of API risk is the 2022 breach at Optus, the Australian telecoms provider, which affected around 9.5 million people according to the Australian privacy regulator, as GovInfoSecurity reported. In its court filing, the Australian Communications and Media Authority alleged that a coding error had weakened the access control on an internet-facing API. According to iTnews, the ACMA also alleged that Optus had found and fixed the same error on its main website in 2021 but missed it on the API, which had been left online despite no longer being in use.
Interestingly, nothing about that alleged weakness was exotic. A forgotten API, missing access control and no one testing it directly is exactly the combination that API penetration testing is designed to find.
What API Penetration Testing Covers
API penetration testing is a security assessment that targets your APIs directly, in the same way an attacker would. Instead of testing through the app or website, testers send their own requests to each endpoint and examine how the API responds when it’s used in ways the developers didn’t expect.
A thorough test typically covers the following areas.
Authentication
Testers check how the API confirms who’s making a request. That includes how tokens and API keys are issued, how long they last and how easily they could be guessed, stolen or reused. They also look for any endpoints that can be reached without authentication at all.
Authorisation and access control
This is where the most serious API vulnerabilities are usually found. Testers try to access another user’s data by changing an ID in a request, reach administrative functions as a standard user, and change fields that users shouldn’t be able to edit, such as their own account role or a price.
Excessive data exposure
Testers look at exactly what each endpoint returns. It’s common to find APIs sending back full customer records, internal IDs or sensitive fields that the app never displays but that anyone intercepting the traffic can read.
Input handling
Like any application, APIs need to handle unexpected input safely. Testers check for injection flaws, unsafe handling of files and data, and ways to make the API fetch resources it shouldn’t, such as internal systems.
Rate limiting and abuse
Testers check if the API can be abused through sheer volume, such as guessing passwords or one-time codes, scraping data in bulk or running up costs on paid services. This matters a great deal for APIs behind chatbots and AI tools, where each request can carry a real cost.
Inventory and versions
Testers identify which endpoints and versions exist, including old, undocumented or test versions that are still reachable. As the Optus case shows, a forgotten API can be the weakest link of all.
Third-party and AI integrations
Testers look at how your APIs consume data from other services, and how your chatbot or AI tools connect to your back-end systems. That includes checking the permissions those integrations have, how their credentials are stored, and if a third-party service or a manipulated AI response could be used to reach data it shouldn’t. Each of those integrations is part of your supply chain risk.
The OWASP API Security Top 10
The OWASP API Security Top 10 is a widely used list of the most critical security risks facing APIs. Its current edition was published in 2023, and you can find it on the OWASP API Security project site, with a helpful plain-English overview from Nordic APIs:
| Risk | What it means in plain terms |
| API1: Broken object-level authorisation | One user can access another user’s data by changing an ID in a request |
| API2: Broken authentication | Weaknesses in login or token handling let attackers pose as other users |
| API3: Broken object property level authorisation | The API reveals or lets users change specific fields they shouldn’t, such as a role or a price |
| API4: Unrestricted resource consumption | No limits on requests, letting attackers overload the API or run up costs |
| API5: Broken function-level authorisation | Ordinary users can reach administrative functions |
| API6: Unrestricted access to sensitive business flows | Legitimate features, such as buying or booking, can be abused at scale by automated tools |
| API7: Server-side request forgery | The API can be tricked into fetching data from places it shouldn’t, such as internal systems |
| API8: Security misconfiguration | Insecure settings, verbose error messages or missing security controls |
| API9: Improper inventory management | Old, forgotten or undocumented API versions left exposed |
| API10: Unsafe consumption of APIs | Trusting data from third-party APIs without checking it properly |
Notably, three of the top five risks are about authorisation, meaning whether the API correctly checks what each user is allowed to do. That’s no accident. Authorisation flaws are common; they’re often serious, and they’re very hard for automated tools to find reliably.
If you’re familiar with the web version, our guide to the OWASP Top 10 explains how that list works, and our guide to web application penetration testing covers the wider testing it sits within.
Why Chatbots and AI Tools Raise the Stakes
Chatbots and AI assistants have added a new layer to API risk. A traditional API is reached by an app or website that you built and control. An API behind a chatbot can effectively be reached by anyone who can type a message, with the chatbot acting as a go-between.
That creates some specific risks:
- Over-privileged integrations. If a chatbot’s connection to your CRM can read every customer record when it only ever needs the current user’s, a successful prompt injection attack could expose all of them. OWASP’s guidance for AI applications calls this “excessive agency”.
- Exposed keys and credentials. Chatbot widgets and AI features sometimes include API keys in the code that runs in the user’s browser, where anyone can find them.
- Missing checks on the back end. Developers sometimes rely on the chatbot’s instructions to stop it from revealing data, instead of enforcing access control in the API itself. Instructions can be manipulated, while proper access controls can’t be talked around.
- Uncontrolled costs. AI services are usually billed by usage, so an API without rate limiting can be abused to run up a significant bill.
The right approach is to test both sides. LLM penetration testing looks at how the AI itself can be manipulated, while API penetration testing checks that the systems behind it enforce their own security, whatever the AI asks for. Our posts Chatbot Security: How Safe Is Your Chatbot? and AI chatbot security in schools cover the chatbot side in more detail.
Mobile Apps and APIs
Most of the serious vulnerabilities in a mobile app aren’t in the app itself but in the APIs it relies on, because anyone can intercept the app’s traffic and start sending their own requests. That’s why any mobile app penetration testing engagement should include the back-end APIs in scope.
How an API Penetration Test Works
Scoping
The tester needs to know which APIs are in scope, what they do, and which user roles exist. API documentation, such as an OpenAPI or Swagger file, makes testing far more efficient, and test accounts for each role are essential for checking access control properly. It’s also worth including any integrations with chatbots, AI services or third parties.
Discovery
Testers map every endpoint they can find, including ones that aren’t documented. This is often where forgotten versions and test endpoints come to light.
Testing
Testers work through each endpoint, manipulating requests to test authentication, authorisation, data exposure, input handling and rate limiting. API penetration testing tools play a part here, as they speed up repetitive tasks such as sending large numbers of requests. But the most important vulnerabilities, particularly authorisation flaws and business logic issues, are found by testers who understand what the API is supposed to do. Our guide to automated vs manual penetration testing explains why.
Reporting and retesting
The report should explain each finding, show how it could be exploited and give your developers clear guidance on how to fix it. Once fixes are in place, retesting after fixing vulnerabilities confirms that they work.
When Should You Test Your APIs?
APIs change often, so testing needs to keep pace. The most common triggers are:
- Before launching a new API, app or chatbot, so issues are fixed before anyone else finds them.
- After significant changes, such as new endpoints, new user roles, a new authentication system or a new AI integration.
- For compliance and customer requirements, such as PCI DSS for payment APIs, or SOC 2 for SaaS products selling into the US.
- At least once a year, and more often for APIs that change regularly, where penetration testing as a service can help you keep up.
If you’re budgeting for a test, our guide to how much a penetration test costs explains what drives the price.
API Penetration Testing with Fortifi
Fortifi is a CREST-accredited penetration testing company, and we test APIs alongside the web applications, mobile apps, chatbots and AI tools that depend on them. Because the same API often serves more than one front end, we can combine API testing with web app penetration testing, mobile app testing or LLM testing, so nothing falls through the gaps.
Because we don’t do sales calls, you’ll speak directly to a cybersecurity expert who can help you scope a test around your APIs, your integrations and your release schedule. Book a call with our team today.
API Penetration Testing FAQs
What is API penetration testing?
API penetration testing is a security assessment that targets an application’s APIs directly, sending crafted requests to each endpoint to find weaknesses in authentication, access control, data exposure and input handling. It finds issues that testing through the app or website alone can miss.
What is the difference between API pentesting and web application testing?
Web application testing looks at an application through its user interface, as a user would see it. API pentesting goes straight to the APIs behind it, which often expose more data and functions than the interface shows. The two overlap, and many engagements cover both.
Do I need to test the APIs behind my chatbot?
Yes, if your chatbot can reach customer data, bookings, orders or internal documents. The chatbot is effectively a public route into those systems, so the APIs behind it need to enforce their own access controls, whatever the chatbot asks for.
Can automated tools test APIs on their own?
Automated tools are useful for finding known issues and testing at scale, but they struggle with authorisation flaws and business logic, which are among the most serious API vulnerabilities. A manual test by an experienced tester is still needed to find them reliably.