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-77936 Overview
CVE-2026-77936 affects Letta through version 0.16.8. The shipped compose.yaml does not enable LETTA_SERVER_SECURE, so the password middleware is never registered. All API routes remain unauthenticated by default. The same configuration exposes a superuser PostgreSQL port with default credentials.
Remote attackers can execute arbitrary Python code through POST /v1/tools/run, manage administrative users through /v1/admin, and run operating system commands through PostgreSQL COPY PROGRAM. The weakness is classified under CWE-1188: Initialization of a Resource with an Insecure Default.
Critical Impact
Unauthenticated remote attackers can execute arbitrary Python and operating system commands on any default Letta deployment, resulting in full host compromise.
Affected Products
- Letta versions through 0.16.8
- Letta Docker Compose deployments using the default compose.yaml
- Bundled PostgreSQL container exposed with superuser default credentials
Discovery Timeline
- 2026-10-20 - CVE-2026-77936 published to NVD
- 2026-10-20 - Last updated in NVD database
Technical Details for CVE-2026-77936
Vulnerability Analysis
Letta ships a Docker Compose file that omits the LETTA_SERVER_SECURE environment variable. Without this flag, the FastAPI server never attaches the password-check middleware. Every REST endpoint responds to unauthenticated callers.
The exposed endpoints include POST /v1/tools/run, which executes user-supplied Python code inside the server runtime. The /v1/admin route tree permits creation, modification, and deletion of user accounts without credentials. An attacker can escalate from anonymous network access to full administrative control of the Letta instance.
The same Compose configuration publishes the PostgreSQL container on a host-reachable port using the superuser account and a known default password. PostgreSQL COPY PROGRAM lets a superuser execute arbitrary shell commands on the database host. This provides a second, independent path to remote code execution.
Root Cause
The root cause is an insecure default configuration. The security middleware is gated on an environment variable that the shipped Compose file never sets. The PostgreSQL service is configured with default superuser credentials and a published port.
Attack Vector
Exploitation requires only network reach to the Letta API port or the PostgreSQL port. No authentication, user interaction, or prior access is needed. Attackers reach code execution through POST /v1/tools/run, administrative takeover through /v1/admin, or command execution through PostgreSQL COPY PROGRAM. Technical references are available in the VulnCheck advisory and the Lasso Security vulnerability entry.
See the upstream compose.yaml and the REST API implementation for the specific lines involved.
Stop Remote Code Execution Before It Runs
Singularity™ Endpoint detects and blocks exploit attempts at machine speed, including zero-days and novel attack techniques.
Stop Exploit AttemptsDetection Methods for CVE-2026-77936
Indicators of Compromise
- Unauthenticated HTTP requests to /v1/tools/run containing Python payloads
- Unexpected account creation or modification events against /v1/admin endpoints
- PostgreSQL sessions issuing COPY ... FROM PROGRAM or COPY ... TO PROGRAM statements
- Child processes spawned by the Letta server or PostgreSQL container, such as /bin/sh, python, or curl
Detection Strategies
- Alert on inbound requests to Letta API paths from clients that have not completed authentication
- Inspect PostgreSQL audit logs for COPY PROGRAM usage by any role, including the superuser
- Monitor container runtime telemetry for new processes under the Letta or PostgreSQL images
- Correlate outbound network connections from Letta containers against known command-and-control infrastructure
Monitoring Recommendations
- Enable PostgreSQL statement logging (log_statement = 'all') on the Letta database
- Forward Letta application logs and container runtime events to a central log platform
- Baseline normal API callers and alert on new source addresses hitting /v1/tools/run or /v1/admin
- Track exposure of TCP ports used by the Letta API and PostgreSQL on internet-facing hosts
How to Mitigate CVE-2026-77936
Immediate Actions Required
- Set LETTA_SERVER_SECURE=true and configure a strong server password before restarting the service
- Remove the published PostgreSQL port mapping from compose.yaml so the database is reachable only from the internal Compose network
- Rotate the PostgreSQL superuser password and replace any default credentials shipped with the stack
- Restrict network access to the Letta API using a firewall, reverse proxy with authentication, or private network
Patch Information
At the time of publication, the advisory describes the issue as present through Letta 0.16.8. Monitor the Letta project repository and the VulnCheck advisory for an updated release that ships secure defaults.
Workarounds
- Place Letta behind an authenticating reverse proxy that terminates TLS and enforces access control
- Bind the Letta API and PostgreSQL ports to loopback interfaces only when running on a single host
- Disable or firewall /v1/tools/run and /v1/admin if the deployment does not require remote tool execution or administrative APIs
- Replace the bundled PostgreSQL superuser account with a least-privileged application role and revoke the pg_execute_server_program role from all non-essential users
# Configuration example: enable the Letta password middleware
# and remove the PostgreSQL host port mapping
services:
letta_server:
environment:
- LETTA_SERVER_SECURE=true
- LETTA_SERVER_PASSWORD=${LETTA_SERVER_PASSWORD}
letta_db:
# Remove or comment out any "ports:" mapping that publishes 5432
environment:
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
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

