Authentication Bypass in MemOS via Internal Middleware Misconfiguration
MemOS contains an authentication bypass vulnerability where unset environment variables cause the internal request middleware to fail open, granting unauthenticated remote attackers administrative access.
CVE search metadata
CVE search record: CVE-2026-75110. Severity: critical. CVSS: 9.8. KEV: no. Product: MemOS. Brief: Authentication Bypass in MemOS via Internal Middleware Misconfiguration. Brief link: https://feed.craftedsignal.io/briefs/2026-08-memos-auth-bypass/
MemOS, a memory operating system designed for LLMs and AI agents, contains a critical authentication bypass vulnerability (CVE-2026-75110). The issue resides in the is_internal_request() function within src/memos/api/middleware/auth.py. In environments where AUTH_ENABLED is set to true, the system attempts to verify internal service requests by comparing the X-Internal-Service header against the INTERNAL_SERVICE_SECRET environment variable.
If the INTERNAL_SERVICE_SECRET variable is not explicitly configured by the administrator, the os.getenv call returns None. Simultaneously, a request lacking the X-Internal-Service header also results in None. Consequently, the comparison None == None evaluates to true, causing the middleware to improperly classify an unauthenticated external request as a trusted internal principal with "all" scopes. This flaw grants attackers full access to sensitive administrative endpoints, including those for API-key management, allowing them to mint, enumerate, and revoke keys, or generate a master key for persistent, privileged unauthorized access to the entire data platform.
Attack Chain
- Attacker performs reconnaissance to identify a MemOS deployment exposing the API surface.
- Attacker probes the authentication middleware by sending arbitrary requests without the
X-Internal-Serviceheader. - The server-side
auth.pymiddleware retrieves the value of the unsetINTERNAL_SERVICE_SECRETenvironment variable, which resolves toNone. - The middleware retrieves the missing header value from the request, which also resolves to
None. - The
is_internal_request()function executes the comparisonNone == None, returningTrue. - The MemOS middleware grants the request a trusted internal principal identity with broad "all" scopes.
- Attacker submits requests to the
/api/key-managementendpoint to mint new administrative API keys. - Attacker uses the newly minted keys to exfiltrate data or gain persistent, unauthorized administrative access.
Impact
Successful exploitation of this vulnerability leads to complete compromise of the MemOS instance. An attacker can bypass all authentication controls, gain administrative access to API-key management, and exfiltrate or manipulate LLM/agent memory data. Given the "all" scope granted, attackers can generate persistent master keys, effectively providing long-term unauthorized access even if the underlying environment configuration is eventually corrected.
Recommendation
Prioritize the immediate remediation of affected MemOS instances.
- Deploy an
INTERNAL_SERVICE_SECRETenvironment variable with a strong, high-entropy secret key immediately to force theos.getenvreturn value to be non-null. - Review all logs for unauthorized access to administrative paths (e.g.,
/api/key-management) originating from external IP addresses. - Audit all active API keys in the MemOS deployment for unauthorized additions or modifications created since the deployment was initialized.
- Upgrade MemOS to the patched version once released by the vendor to enforce robust header validation.
Immediate actions
Set INTERNAL_SERVICE_SECRET environment variable on all MemOS instances