Detecting Weak Access Controls on Inference Endpoints
Model inference endpoints that lack proper access controls allow any client to query the model directly, bypassing application-layer restrictions, usage limits, content filtering, and audit logging. Missing authentication on a model server exposes the raw model without any of the guardrails the application layer applies. Weak authorization on an application proxy endpoint may allow access to models or capabilities not intended for the current user role. This page confirms which access control weaknesses are present before exploiting them.
Test for Unauthenticated Direct Model Access
Send a completion request with no authentication headers to each identified inference endpoint:
A successful completion response with no authentication confirms the endpoint is fully open. This bypasses every restriction the application layer imposes — content filtering, rate limiting, topic restrictions, and audit logging. The raw model is directly accessible.
Test API Key Strength and Bypass
When an API key is required, test whether the implementation is correctly enforced:
A successful response with an invalid, empty, or null token confirms authentication is not correctly enforced. Some implementations check for the presence of an Authorization header but not the validity of the token value.
Test for Horizontal Privilege Escalation
When authentication is present, test whether the endpoint enforces user-level isolation — can one user access another user's conversation history or agent context:
Access to another user's conversation history confirms broken object-level authorization. In an AI context this exposes conversation content, any extracted information from tool calls, and agent memory associated with other users.
Test for Model Selection Bypass
Some deployments restrict which model a user can call. Test whether the model parameter can be freely changed to access more capable or less restricted models:
A successful response from a model the application does not normally expose confirms the model selection parameter is not validated server-side. This may allow access to more capable models than the application intends to provide, or models with different safety configurations.
Test Rate Limit Enforcement
Missing or weak rate limits on inference endpoints enable abuse that generates costs for the target organization and allows brute-force of injection payloads at scale:
200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200 200
Twenty consecutive 200 responses with no rate limiting confirms the endpoint has no request throttling. This enables high-volume injection testing and extraction attacks without triggering automatic blocks.
References
-
OWASP Top 10 for LLM Applicationsowasp.org/www-project-top-10-for-large-language-model-applications (opens in new tab)
LLM05: Improper Output Handling and access control weakness reference
-
Ollama — API documentationgithub.com/ollama/ollama/blob/main/docs/api.md (opens in new tab)
Ollama authentication configuration and default open access reference
Was this helpful?
Your feedback helps improve this page.