CVE-2026-31245 Overview
CVE-2026-31245 affects mem0 1.0.0, an open-source memory layer for AI applications. The server exposes a memory creation endpoint (POST /memories) without authentication or authorization controls. Remote attackers can send unauthenticated requests to inject arbitrary memory records into the database. This enables data pollution, injection of spoofed entries, and contamination of downstream AI workflows that consume the stored memories. The vulnerability is classified under CWE-306: Missing Authentication for Critical Function.
Critical Impact
Unauthenticated remote attackers can inject arbitrary memory records into mem0 1.0.0 databases, polluting AI memory stores and corrupting context used by downstream LLM applications.
Affected Products
- mem0 1.0.0 (cpe:2.3:a:mem0:mem0:1.0.0)
- Deployments exposing the POST /memories endpoint to untrusted networks
- AI applications consuming mem0 memory records as context
Discovery Timeline
- 2026-05-12 - CVE-2026-31245 published to NVD
- 2026-05-14 - Last updated in NVD database
Technical Details for CVE-2026-31245
Vulnerability Analysis
The mem0 1.0.0 server exposes the memory creation API at POST /memories without enforcing authentication or authorization. Any client able to reach the service over the network can submit arbitrary memory records. The server accepts these records and persists them to the underlying memory store without validating caller identity, ownership, or scope.
This flaw maps to CWE-306: Missing Authentication for Critical Function. mem0 functions as a long-term memory layer for AI agents and LLM applications. Polluted memories can poison retrieval-augmented generation (RAG) pipelines, redirect agent decisions, and inject attacker-controlled context into downstream model prompts. The integrity impact is limited to the memory store itself, but the cascading effect on AI behavior may extend further depending on how applications consume the data.
Root Cause
The POST /memories route handler does not invoke an authentication middleware or check API keys, tokens, or session identifiers before accepting input. There is no authorization layer associating memory records with an authenticated principal. The endpoint treats anonymous network callers as trusted writers.
Attack Vector
An attacker with network reachability to the mem0 server issues an HTTP POST request to /memories containing a JSON payload with arbitrary memory content and optional user identifiers. The server stores the record without challenge. Repeated requests can flood the database, overwrite expected user context, or inject prompt-injection payloads that activate when an LLM later retrieves the memory. No credentials, user interaction, or prior access are required.
No public proof-of-concept exploit code is available at the time of publication. See the GitHub Repository for Mem0 for API specifics and the Notion CVE-2026-31245 advisory for vendor details.
Detection Methods for CVE-2026-31245
Indicators of Compromise
- Unauthenticated POST /memories requests in mem0 access logs originating from unexpected source IPs
- Sudden growth in the memory record count or appearance of records lacking expected user-id associations
- Memory entries containing prompt-injection strings, suspicious URLs, or instructions targeting downstream LLMs
- Duplicate or near-duplicate records suggesting automated flooding
Detection Strategies
- Enable verbose HTTP access logging on the mem0 service and alert on POST /memories requests that lack authentication headers
- Baseline normal memory write volume per source and flag anomalous spikes
- Run content inspection on stored memories to detect prompt-injection patterns or out-of-policy text
- Correlate mem0 write activity with upstream identity provider logs to identify writes with no matching authenticated session
Monitoring Recommendations
- Forward mem0 server logs to a centralized logging or SIEM platform for retention and correlation
- Monitor egress and ingress on the mem0 service port for unexpected external exposure
- Track database row counts and storage growth to detect bulk injection attempts
How to Mitigate CVE-2026-31245
Immediate Actions Required
- Restrict network access to the mem0 service so only trusted application backends can reach POST /memories
- Place mem0 behind an authenticating reverse proxy or API gateway that enforces token validation before forwarding requests
- Audit existing memory records for injected or spoofed entries and purge anything that does not match a valid user session
- Review the Notion CVE-2026-31245 advisory for vendor guidance
Patch Information
No fixed version is identified in the current NVD entry for mem0 1.0.0. Monitor the mem0 GitHub repository for security releases that add authentication and authorization to the memory creation endpoint.
Workarounds
- Deploy mem0 only on internal networks and block external inbound access to its listening port
- Front the service with an authenticating proxy (for example, NGINX or Envoy) that requires a valid bearer token on every request to /memories
- Implement application-layer validation that rejects memory records lacking a verified user identifier
- Apply rate limiting on POST /memories to slow automated injection attempts
# Example NGINX reverse proxy snippet enforcing bearer token auth in front of mem0
location /memories {
if ($http_authorization !~* "^Bearer [A-Za-z0-9._-]+$") {
return 401;
}
limit_req zone=mem0_writes burst=10 nodelay;
proxy_pass http://127.0.0.1:8000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.


