Skip to main content
Vulnerability Database/CVE-2026-111702

CVE-2026-111702: ChatOllama Information Disclosure Vulnerability

CVE-2026-111702 is an insecure direct object reference flaw in ChatOllama allowing attackers to access private knowledge bases. This article covers technical details, exploitation methods, and mitigation strategies.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-111702 Overview

CVE-2026-111702 is an Insecure Direct Object Reference (IDOR) vulnerability in ChatOllama through commit 96c3ce5. The flaw allows unauthenticated remote attackers to read other users' private knowledge bases by iterating sequential numeric identifiers. Attackers reach the data through the GET /api/knowledgebases/{id} endpoint or by supplying the knowledgebaseId parameter to POST /api/models/chat. Both paths return metadata and retrieved document content without enforcing ownership checks. The weakness maps to CWE-639: Authorization Bypass Through User-Controlled Key.

Critical Impact

Any network-reachable attacker can enumerate knowledge base IDs and exfiltrate private documents indexed by other ChatOllama users without authentication.

Affected Products

  • ChatOllama (sugarforever/chat-ollama) through commit 96c3ce5
  • Knowledge Base API endpoint GET /api/knowledgebases/{id}
  • Chat Model endpoint POST /api/models/chat (via the knowledgebaseId parameter)

Discovery Timeline

  • 2026-10-16 - CVE-2026-111702 published to NVD
  • 2026-10-16 - Last updated in NVD database

Technical Details for CVE-2026-111702

Vulnerability Analysis

ChatOllama exposes two server routes that accept a knowledge base identifier directly from the client. The handler in server/api/knowledgebases/[id].get.ts retrieves the record by primary key and returns it without validating the requesting user's ownership. The chat handler in server/api/models/chat/index.post.ts performs retrieval-augmented generation using any knowledgebaseId supplied in the request body and returns the resulting document chunks in the model response.

Because knowledge bases are keyed by sequential integers, an attacker can walk the ID space with simple numeric iteration. The result is cross-tenant disclosure of private documents, embeddings metadata, and any sensitive content users have uploaded to augment their local LLM workflows. See the VulnCheck advisory on Chat-Ollama and the HackMD IDOR analysis for a detailed walkthrough.

Root Cause

The root cause is missing authorization on resource lookup. Both the knowledge base API code and the chat model code query records by the client-supplied ID without comparing the record's owner to the session principal. Authentication state is effectively ignored for these routes, which is the defining pattern of [CWE-639].

Attack Vector

Exploitation requires only network access to the ChatOllama instance. An attacker sends GET /api/knowledgebases/1, then /2, /3, and so on, collecting metadata for every provisioned knowledge base. For each discovered ID, the attacker posts a chat request with that knowledgebaseId to force the retrieval pipeline to return embedded document chunks. No special tooling, authentication token, or user interaction is required.

Detection Methods for CVE-2026-111702

Indicators of Compromise

  • Sequential GET requests to /api/knowledgebases/{id} iterating numeric IDs from a single source address.
  • POST /api/models/chat requests where the same client cycles through different knowledgebaseId values across a short window.
  • Access to knowledge base IDs that do not belong to the authenticated session user, or access from unauthenticated sessions.
  • Elevated response sizes from /api/models/chat consistent with bulk document chunk retrieval.

Detection Strategies

  • Parse reverse-proxy or application logs for enumeration patterns against the two affected endpoints and alert on monotonically increasing id values.
  • Correlate the user ID in the session with the owner of the returned knowledge base record; flag mismatches.
  • Baseline normal per-user knowledge base access counts and alert on outliers.

Monitoring Recommendations

  • Forward ChatOllama access logs to a centralized analytics platform for cross-session correlation.
  • Retain full request bodies for /api/models/chat so investigators can reconstruct which knowledgebaseId values were queried.
  • Track 200-response rates for /api/knowledgebases/{id} by source IP to spot scraping behavior.

How to Mitigate CVE-2026-111702

Immediate Actions Required

  • Restrict network access to ChatOllama instances so they are not reachable from untrusted networks.
  • Audit knowledge base access logs for prior enumeration and treat exposed content as disclosed.
  • Rotate or remove sensitive documents previously indexed into shared ChatOllama deployments pending a fix.

Patch Information

No fixed version is identified in the published advisory. The vulnerability is present through commit 96c3ce5 of the sugarforever/chat-ollama repository. Monitor the upstream repository and the VulnCheck advisory for a patched commit, and update once an ownership check is merged into both the knowledge base GET handler and the chat POST handler.

Workarounds

  • Place ChatOllama behind an authenticating reverse proxy that enforces per-user access policies on /api/knowledgebases/* and /api/models/chat.
  • Apply a local patch that compares the authenticated user's ID against the user_id (or equivalent owner field) on each knowledge base record before returning data.
  • Operate separate ChatOllama instances per tenant or trust boundary to eliminate cross-user exposure until an upstream fix lands.
bash
# Example nginx policy to block unauthenticated knowledge base enumeration
location ~ ^/api/(knowledgebases|models/chat) {
    auth_request /auth;
    limit_req zone=kb_enum burst=5 nodelay;
    proxy_pass http://chatollama_upstream;
}

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.