/

CVE-2026-45829

Severity:

CRITICAL RISK

(10.0)

Pre-auth Code Injection (CWE-94) in ChromaDB API

CVE-2026-45829

Awaiting Analysis

Vulnerability type

Category:

Code Injection

CWE:

CWE-94, CWE-502

Impact:

Remote Code Execution

Severity:

CRITICAL RISK

(10.0)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A pre-authentication code injection vulnerability in ChromaDB allows arbitrary code execution on the server when a malicious model repository is accepted with trust_remote_code enabled.

An unauthenticated attacker can exploit the collections API endpoint to load untrusted code from a remote repository, leading to full system compromise under typical deployment conditions.

Affected context

This vulnerability appears in ChromaDB deployments that expose the /api/v2/tenants/{tenant}/databases/{db}/collections endpoint and allow clients to specify model repositories with trust_remote_code set to true.

It becomes relevant in environments where the ChromaDB server runs with sufficient privileges and outbound network access to fetch remote model code, especially when no strict validation or allowlisting is enforced on model sources.

Exploit preconditions

  • Attack surface: Public or internal HTTP API at /api/v2/tenants/{tenant}/databases/{db}/collections
  • Required access: No prior authentication; attacker only needs network reachability to the ChromaDB server
  • Trigger point: Submission of a collection configuration referencing a malicious model repository with trust_remote_code=true
  • Why exploitation is possible: The server trusts client-supplied repository URLs and the trust_remote_code flag, causing loading and execution of remote, unvalidated code within the server process

Why this happens

The core issue is the unsafe execution of user-controlled code sources, mapping to CWE-94: Improper Control of Generation of Code (Code Injection).

By honoring trust_remote_code=true from client input and dynamically loading code from arbitrary repositories, the server treats untrusted configuration as executable logic.

The pattern is an insecure design where runtime code loading is directly influenced by API parameters without stringent trust boundaries, validation, or restrictions on permissible sources.

Potential impact

  • An attacker can execute arbitrary code with the privileges of the ChromaDB server process
  • Full compromise of stored data, including reading, modifying, or deleting collections
  • Use of the compromised server as a pivot for lateral movement within the hosting environment
  • Deployment of backdoors or malicious payloads, enabling persistent access
  • Potential supply-chain style impacts if the service is part of a larger AI or data processing pipeline

General mitigation guidance

Mitigation centers on removing the ability for untrusted clients to influence code-loading behavior and tightening trust boundaries around model repositories.

Common defensive patterns include:

  • Treating all remote code as untrusted by default and disallowing client-controlled trust_remote_code flags
  • Restricting model loading to vetted, allowlisted repositories managed by operators rather than users
  • Introducing strict validation and schema controls on collection creation requests, rejecting any parameters that imply dynamic code execution
  • Running the server with least privilege and applying process-level isolation to reduce the blast radius of any code execution paths
  • Segregating configuration that affects runtime code from user-facing APIs, keeping such controls in operator-managed settings

How teams detect issues like this

Detection efforts can focus on both code-level indicators and runtime behavior.

At development time, static analysis and code review can flag dynamic import or trust_remote_code flows tied directly to HTTP request parameters or other user input.

Policy enforcement in CI/CD can require explicit justification or secure wrappers for any remote code-loading mechanisms.

At runtime, monitoring for unusual outbound connections to arbitrary repositories, unexpected module loading patterns, or anomalous process behavior can help identify exploitation attempts or misuse of these features.

Sources

SourceLink
github.comgithub.com/chroma-core/chroma/issues/6717
hiddenlayer.comhiddenlayer.com/research/chromatoast-served-pre-auth
access.redhat.comaccess.redhat.com/security/cve/CVE-2026-45829
bugzilla.redhat.combugzilla.redhat.com/show_bug.cgi?id=2479623
security.access.redhat.comsecurity.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-45829.json

Frequently asked

questions

Yes. Any actor with network access to the affected ChromaDB API endpoint can attempt exploitation without prior authentication.

The attacker can run arbitrary code with the same privileges as the ChromaDB server process, which often includes access to all managed data and, in some setups, broader system resources.

Decouple code-loading decisions from user input entirely: disable user-controlled trust_remote_code, restrict model sources to operator-managed allowlists, and ensure configuration never directly triggers execution of remote, unvalidated code.

Avoid exposing configuration options that control code execution to arbitrary clients, enforce strict validation and trust boundaries for any feature that loads code or plugins, and incorporate security review for dynamic loading mechanisms before they are exposed as public API capabilities.

Find out what's already
exploitable in your codebase.