OWASP API Security Top 10 for LLM endpoints: a route-by-route control map
The OWASP API Security Top 10 applies to LLM endpoints at the HTTP API layer. Object and function authorization, authentication, resource limits, SSRF controls, configuration, inventory, and third-party response validation still govern the route. Prompt injection and model behavior require a separate LLM-security layer. This guide maps each API risk to a testable endpoint control.

An LLM endpoint is still an API. It accepts a request and authenticates a caller. It consumes compute and reads objects. It also reads properties and invokes functions, and it often calls other services. The OWASP API Security Top 10 for 2023 applies to that HTTP surface before a model interprets one token. I would fail a design review that treats prompt injection as the entire security plan. The API route can lose data or expose an admin function. It can burn budget or reach an internal URL while the model behaves exactly as configured.
TL;DR
- The OWASP API Security Top 10 applies to the HTTP API around an LLM and an agent, including a gateway or a model-serving endpoint.
- Test object and property access alongside authentication and function authorization. Also test resource ceilings and sensitive workflows, remote-resource fetching and configuration, and endpoint inventory and upstream API data.
- Prompt injection and system-prompt leakage need LLM-specific controls. So do model output and excessive agency, in addition to the API layer.
- Keep the review route-specific. A gateway can govern traffic it receives. Direct provider calls and native SaaS AI need controls at their own boundaries, as do local execution and STDIO tools.
The API list and the LLM list cover different failure layers
The official OWASP API Security edition names ten general API risks. API1 covers object-level authorization, while API2 addresses authentication and API3 moves the check to object properties. The remaining entries cover resource consumption and function authorization. They also cover sensitive business flows and server-side request forgery, plus configuration and inventory, and third-party API consumption.
The OWASP LLM Top 10 addresses model-application risks such as prompt injection and sensitive information disclosure. The two lists overlap around data and authorization. They also overlap around consumption and upstream trust, but one cannot replace the other. API review asks whether the caller may reach the route or object, including a property or function. It also asks how the service handles resources and dependencies. LLM review asks what happens when natural-language content enters the model context and when model output leaves it.
Draw one route on a whiteboard before testing. Start with the caller and application, then mark the gateway or policy point and model endpoint. Add the tools and upstream services, followed by the evidence store. Mark each exact HTTP hop on that line. The drawing stops the review from assigning a control to traffic it never receives.
API1 and API3 protect conversations, files, and response fields
API1: Broken Object Level Authorization applies whenever an endpoint accepts an object identifier and acts on the referenced record. For an LLM application, the object could be a conversation or assistant, a file or vector-store namespace, an evaluation run or agent job, or a tenant configuration. The test is direct. Authenticate as caller A, substitute caller B's identifier, and verify that the server denies the operation at every function that uses the identifier.
API3: Broken Object Property Level Authorization covers reading or changing fields the caller lacks permission to access. An LLM route may return internal instructions and model configuration, tool definitions and token accounting, or retrieval metadata and policy fields beside the user-visible response. Build explicit request and response schemas. Select returned fields, then test hidden or privileged properties under multiple roles. A model refusing to discuss a field is irrelevant if the JSON response already exposes it.
Keep the evidence compact. Record the request identity and role, the object ID and attempted property, and the status and response fields. Include the policy decision. The screenshot should show two browser tabs or terminals using different tenants. The denied object ID should be visible in the second request.
API2 and API5 split identity from authority
API2: Broken Authentication covers flaws that let an attacker compromise authentication tokens or assume another identity. For LLM endpoints, inventory every authentication flow. Include direct model routes and gateway routes, streaming connections and batch jobs, plus callbacks and administrative consoles. Validate tokens at the receiving service. Enforce expiry and audience. Protect reset or key-issuance flows and test revoked credentials.
API5: Broken Function Level Authorization addresses callers reaching functions outside their role. Model selection and fine-tuning jobs may share one host with file deletion and policy changes. Tool registration and audit export may also share that host with usage-limit changes, while requiring different authority. Deny by default. Test each function under ordinary and privileged identities, then under service and agent identities.
Authentication proves who or what presented a valid credential. The authorization decision still needs the requested route and function, plus the object and role. It also needs relevant arguments. The post-authentication gap appears when a valid identity receives broad model or tool access without that per-request decision.
API4 and API6 govern cost and sensitive workflows
API4: Unrestricted Resource Consumption covers missing or excessive limits on resources used to satisfy an API call. LLM routes add input and output tokens, concurrent streams and tool iterations, retrieval fan-out and uploaded files, plus batch size and paid upstream calls. These sit beside the usual CPU and memory concerns, including storage and bandwidth. Set limits for each resource the route can cause. Then test the boundary and the value immediately above it.
API6: Unrestricted Access to Sensitive Business Flows concerns excessive automated use of a workflow that can harm the business. An agent endpoint may submit refunds and create support credits. It may send messages or open tickets, and it may place orders or trigger account changes through legitimate calls. Identify the business workflow. Then add the right mix of role and state checks, velocity limits and idempotency, and approval and abuse monitoring.
Do not hide these controls inside one "rate limited" checkbox. A token ceiling controls model consumption. It says nothing about ten valid refund calls. Record the resource limit and business-flow condition as separate acceptance tests.
API7 puts URL-taking tools under SSRF review
API7: Server-Side Request Forgery arises when an API fetches a user-supplied URL without adequate validation. LLM applications create this path through URL ingestion and web retrieval, image loading and webhook testing, or document import and agent tools that fetch remote resources. A model-generated URL remains untrusted input when the server later retrieves it.
Place resource-fetching logic in an isolated component. Allow expected schemes and ports, plus expected remote origins. Resolve and check destinations. Block private and link-local ranges. Constrain redirects and set response-size and time limits, and avoid returning raw upstream responses. Test literal IP addresses and alternate encodings, DNS changes and redirect chains, plus cloud metadata destinations in a controlled environment. These controls belong to the fetcher and network policy. Prompt screening can reduce suspicious instructions, but it cannot validate the destination selected after resolution.
API8 and API9 expose drift and forgotten routes
API8: Security Misconfiguration can occur across the API stack. For an LLM endpoint, review default credentials and permissive CORS, verbose errors and public administrative routes, debug output and unnecessary HTTP methods, TLS settings and storage permissions, and gateway fallback behavior and model-server defaults. Use a repeatable hardened configuration. Scan it and compare deployed state with the approved baseline.
API9: Improper Inventory Management covers undocumented hosts and versions, including environments and third-party data flows. Inventory public and internal LLM routes, regional endpoints and model versions, gateway aliases and direct provider fallbacks, test hosts and batch APIs, plus streaming variants and deprecation dates. Record which data each route receives. Also record which identity system protects it.
A stale /v1 route that bypasses the current policy point defeats the review even if /v2 passes every fixture. Inventory management proves that the diagram matches deployed reality.
API10 treats model and tool responses as untrusted data
API10: Unsafe Consumption of APIs addresses weaker validation for data received from third-party services. An LLM application consumes model responses and retrieval results, tool output and moderation results, plus identity attributes and provider metadata. Validate those inputs before they drive HTML rendering or database queries, shell commands or redirects, or policy decisions or further tool calls.
Use TLS and authenticate the upstream service where supported. Allowlist expected destinations and constrain redirects. Enforce schemas and size limits, sanitize for the downstream sink, and set timeouts. Then test malformed JSON and unexpected content types, oversized fields and injected markup, plus hostile URLs and tool output containing instructions. The OWASP prompt-injection guide covers the model-context side. API10 owns the application decision to trust and act on upstream data.
A route-level acceptance packet keeps the layers honest
Run the API Top 10 review against a fixed set of identities and fixtures. Include two tenants and an ordinary user, an administrator and a service, plus an agent. Exercise object swaps and hidden properties, expired and wrong-audience tokens, privileged functions and resource ceilings, business-flow repetition and URL fetches, plus a deprecated route and malformed upstream responses. Preserve the request and response. Preserve the decision and server-side event for each result too.
Add LLM-specific fixtures separately. Test direct and indirect prompt injection, sensitive input and sensitive output, tool-output instructions, and a response intended for a dangerous sink. The LLM security testing guide provides the regression-testing pattern. Keeping the fixture groups separate shows whether a failure belongs to API authorization or application handling, and to model behavior or route policy.
The HTTP stop line remains explicit. These tests cover calls deliberately sent through the assessed endpoint. Native SaaS assistants and browser traffic sent directly to a public model need controls where those paths run. The same applies to stolen credentials used on an ungoverned route. Local model execution and STDIO tools also need controls where those paths run.
DeepInspect
DeepInspect operates on authenticated HTTP traffic deliberately routed between users or agents and LLM endpoints. The calling application supplies identity and role context. DeepInspect can evaluate that context with route and model signals, prompt and response signals, plus policy signals. It can then permit or redact, and limit or deny before forwarding. Each decision produces a separate audit record, as described in the AI API security vendor guide.
That position can support API2 and API4 controls on the routed call. It can also support API5 and selected API3 or API6 controls, plus LLM-specific prompt and response policy. Object ownership and fetcher isolation keep their separate owners. The same applies to host configuration and endpoint inventory, upstream service security and local execution, plus direct bypass traffic.
Book a demo today.
Frequently asked questions
- Does the OWASP API Security Top 10 replace the LLM top 10?
No. The API Security Top 10 covers API access control and authentication, resources and workflows, SSRF and configuration, plus inventory and upstream trust. The LLM list addresses model-application behavior such as prompt injection and unsafe model output. An LLM endpoint needs both reviews.
- Is an API key enough authentication for an LLM endpoint?
An API key can identify a client credential, but the endpoint still needs secure issuance and storage, rotation and revocation, plus validation. A shared application key may also omit the natural person or agent role behind a request. OWASP API2 recommends understanding every authentication flow. It also warns against treating API keys as user authentication.
- Which API risk covers model cost attacks?
OWASP API4 covers unrestricted consumption that causes denial of service or increased operational cost. For an LLM route, test token and concurrency limits, duration and upload limits, batch and tool-iteration limits, plus paid-upstream limits. Business abuse through repeated valid actions also needs an API6 review.
- Can a gateway fix every item on the list?
A gateway can enforce selected authentication and authorization policies on traffic that traverses it. It can also enforce schema and size policies, rate and routing policies, plus content policies. Object ownership and secure fetcher design still have separate owners. The same applies to deployment hardening and complete asset inventory, plus safe downstream use. Those owners sit in the application and platform, including the network. Direct and local paths remain outside a gateway they bypass.