Skip to main content
  1. Home
  2. IT Services
  3. Security Services
  4. API Security

API Security

APIs expose business logic and data directly. We test whether every request is authenticated, authorized for the specific resource, validated, and limited.

OWASP API Security Top 10

The OWASP API Security Project lists the most critical risks specific to APIs. The 2023 edition is summarized below; see the official site for full details.

Illustration of an API request flowing from a web, mobile, or third-party API client through an API gateway with rate limiting, request validation, and traffic filtering, then authentication, then authorization, to backend services and databases, with unauthorized access, data exposure, and injection attacks shown as threats.
An API request passes through the gateway, authentication, and authorization before reaching backend services. Threats such as unauthorized access, data exposure, and injection can target any stage, so each layer needs its own controls.
OWASP API Security Top 10 — 2023
IDRiskIn short
API1Broken Object Level AuthorizationAccessing another user's object by changing its ID.
API2Broken AuthenticationWeak login, token, or credential handling.
API3Broken Object Property Level AuthorizationReading or writing fields the user should not see or change.
API4Unrestricted Resource ConsumptionNo limits on requests, payload size, or expensive operations.
API5Broken Function Level AuthorizationCalling admin or privileged operations as a regular user.
API6Unrestricted Access to Sensitive Business FlowsAutomated abuse of flows such as sign-up or checkout.
API7Server Side Request ForgeryMaking the server fetch an attacker-chosen URL.
API8Security MisconfigurationInsecure defaults, verbose errors, or missing hardening.
API9Improper Inventory ManagementForgotten, undocumented, or old API versions left exposed.
API10Unsafe Consumption of APIsTrusting data from third-party APIs without validation.

Authentication Is Not Authorization

Authentication confirms who the caller is. Authorization decides whether that caller may perform this action on this specific resource. A valid token proves identity; it does not prove the caller owns the record they are requesting.

  1. API ClientSends a request with a token.
  2. API EndpointReceives and parses the request.
  3. AuthenticationIs the token valid? Who is the caller?Fail → 401 Unauthorized
  4. AuthorizationMay this caller access this resource and action?Fail → 403 Forbidden (or 404)
  5. Backend ResourceReturns only the data the caller is allowed to see.
API authorization flow. A request must pass authentication and then a separate authorization check before it reaches the backend resource. Red labels show where a request is rejected.

Key API Risks and Mitigations

Broken Function Level Authorization

A regular user calls an administrative endpoint, for example one that deletes or exports user accounts.

MitigationDeny by default; check role permissions on the server for every endpoint and HTTP method.

Input & Schema Validation

Unexpected fields, types, or sizes cause errors or unintended changes — such as a "role" field accepted in a profile update.

MitigationValidate requests against a schema; allow-list writable fields and reject unknown ones.

Sensitive Data Exposure

APIs often return full database objects and rely on the client to hide fields.

MitigationReturn only the fields each role needs; mask identifiers such as account or card numbers.

Rate Limiting & Resource Consumption

Unlimited requests enable brute force, scraping, and denial of service through expensive queries.

MitigationRate limits per client and endpoint, maximum page sizes, request size limits, and timeouts; return 429 when exceeded.

Secure Error Handling

Stack traces and database errors reveal internal structure and help attackers refine requests.

MitigationConsistent, generic error responses with a correlation ID; full details only in server logs.

Authentication Weaknesses

Endpoints that skip token checks, accept expired tokens, or allow unlimited login attempts.

MitigationEnforce authentication centrally, validate tokens fully, and throttle login and OTP attempts.

Practical Experience

FEGO's development team has worked through findings from third-party VAPT assessments of fintech mobile apps, web portals, and APIs: analyzing each report, planning fixes, and implementing them. The examples below are generalized and describe the kinds of issues we have worked on. They are not a statement about the current security of any application.

Role-based endpoint restrictions

Making sure an operation intended for one user role cannot be called by another, by enforcing role checks on the server for every endpoint.

Rate limiting

Limiting how often a form or API operation can be submitted, after testers showed that repeated automated submissions were accepted. This has been implemented in response to a reported finding.

Sensitive data in API responses

Removing or masking personal information in API responses so each caller receives only the data it needs.

CORS configuration

Restricting cross-origin access to trusted origins instead of permissive policies.

Server-side input validation

Validating every request on the server, regardless of client-side checks. This has been implemented in response to reported findings.

Safe error responses

Returning consistent, generic error messages instead of internal details.

Remediation and Validation

Remediation approach

  • Review each finding and reproduce it safely in a test environment
  • Prioritize by severity and business impact
  • Agree the fix using standard references such as CWE and OWASP
  • Plan the frontend, backend, and testing work for each fix
  • Fix the root cause on the server, not only in the client

Validation and reporting

  • Verify each fix in internal testing before release
  • Track the status of every finding, from open to fixed
  • Flag fixes that need a business decision or further checks
  • Support retesting by the assessor or client; a finding is closed only when retesting confirms the fix
  • Document what changed and any remaining risk

Strengthen Your Application Security

Let's discuss your security requirements and identify the right approach for your applications and APIs.

Contact FEGO