Summary
The Vanna Chat API endpoint at /api/vanna/v2/ in vanna-ai vanna up to 2.0.2 exposes functionality without enforcing proper authentication.
Remote attackers can directly interact with the chat API over the network, potentially invoking capabilities that should be restricted to authenticated users or service accounts.
Affected context
This vulnerability occurs in deployments of vanna-ai vanna (versions up to 2.0.2) where the /api/vanna/v2/ Chat API endpoint is reachable over a network (e.g., from the internet or from internal client applications).
The issue manifests when the endpoint accepts and processes requests without requiring valid credentials or session context, allowing anonymous users to access behavior that is intended for authenticated clients.
The exact scope of exposed operations depends on how the Chat API is integrated (e.g., data sources, prompt routing, or orchestration logic tied to the endpoint).
Exploit preconditions
- Attack surface: Network-accessible HTTP(S) endpoint at
/api/vanna/v2/. - Required access: No prior authentication; an attacker only needs the ability to send HTTP requests to the service.
- Trigger point: Directly calling the Chat API endpoint with crafted or even minimal valid requests.
- Why exploitation is possible: The endpoint fails to enforce authentication and/or session verification, treating unauthenticated requests as trusted and allowing operations that should require user or application identity.
Why this happens
The underlying issue aligns with CWE-287: Improper Authentication and CWE-306: Missing Authentication for Critical Function.
The Chat API endpoint exposes application functionality without verifying the identity of the caller, either by omitting authentication checks entirely or by misconfiguring middleware and route protections.
As a result, the system incorrectly assumes that any request reaching the endpoint is permitted to invoke chat operations, violating the principle of enforcing identity for sensitive or state-changing actions.
Potential impact
- Unauthorized access to chat capabilities that may be intended only for authenticated users or internal services.
- Potential exposure of conversational context, prompts, or responses that may include sensitive or proprietary information.
- Abuse of backend resources (e.g., model inference, database queries, or tool integrations) leading to increased operational cost or resource exhaustion.
- Indirect access to connected systems or data sources if the Chat API has integrations (such as databases, internal APIs, or knowledge bases).
- Facilitation of automated misuse (e.g., bot-driven requests) due to the lack of authentication barriers.
General mitigation guidance
Mitigation generally focuses on enforcing strict authentication and access control at the API layer, particularly for endpoints that expose business logic or access to data.
Recommended defensive patterns include:
- Requiring strong, mandatory authentication for all Chat API endpoints (e.g., token-based auth, OAuth2, mTLS, or API keys tied to specific clients).
- Centralizing authentication and authorization via middleware or gateway policies so that every protected route, including
/api/vanna/v2/, is covered by default. - Applying the principle of least privilege by scoping tokens or API keys to only the minimal capabilities each client requires.
- Segregating public-facing and internal endpoints, and restricting sensitive Chat API functionality to trusted networks or service identities.
- Designing the API contract so that sensitive operations cannot be performed without explicit, verifiable identity context.
How teams detect issues like this
Effective detection combines static analysis of configuration and code with runtime validation:
- Static review: Examine route definitions and controller handlers to ensure authentication middleware is consistently applied, especially around
/api/vanna/v2/. - Configuration analysis: Review API gateway, reverse proxy, or service mesh policies to confirm that the Chat API path is not excluded from global auth rules.
- Dynamic testing: Perform authenticated vs. unauthenticated request testing to verify that anonymous calls are rejected for any endpoint expected to be protected.
- Logging and monitoring: Enable detailed access logs and anomaly detection for requests to the Chat API, alerting on large volumes of unauthenticated or suspicious access patterns.
- Automated security scanning tools can be configured to probe for unauthenticated access to critical endpoints as part of CI/CD or regular security assessments.

