Skip to content

AAK-MCP-LETTA-CVE-2025-51482-001: Letta (MemGPT) 0.16.4 or earlier (four CVEs: /v1/tools/run RCE, file-URL handler, AST parser)

Severity
HIGH
Category
Supply Chain (supply-chain)
Scanner
agent_audit_kit/scanners/mcp_cve_pins_2026_07.py
Auto-fixable
No.
SARIF name
LettaAgentServerCveChain

What it detects

letta — the agent server formerly known as MemGPT — carries four disclosed vulnerabilities across its 0.4 to 0.16 line, none of which names a fixed release in NVD:

  • CVE-2025-51482 (HIGH): run_tool_from_source in letta.server.rest_api.routers.v1.tools lets a remote caller execute arbitrary Python and system commands through a crafted payload to the /v1/tools/run endpoint. Affected at 0.7.12.
  • CVE-2026-4964: _convert_message_create_to_message in letta/helpers/message_helper.py mishandles the File URL Handler. Affected at 0.16.4.
  • CVE-2026-4965: resolve_type in letta/functions/ast_parsers.py, explicitly recorded as an incomplete fix for CVE-2025-6101. Affected at 0.16.4.
  • CVE-2025-6101: function_message in letta/interface.py, reachable through the function_name / function_args arguments. Affected up to 0.4.1.

The floor is set at 0.16.5, the first release published after the highest affected version — an inference from release ordering, not a vendor fix statement, since every one of the four CPE entries names an exact version with no versionEndExcluding and all four GHSA records are unreviewed with no curated version range. Treat it as "past every version known to be affected" rather than "vendor-confirmed patched". The pin targets the PyPI letta server distribution only: the vulnerable code lives in letta/... module paths, while letta-client and npm @letta-ai/letta-client are separate client SDKs on their own version lines, and npm @letta-ai/letta is a 0.0.1 placeholder.

How to fix

Upgrade letta to >= 0.16.5 and pin it. Because no vendor fix statement exists for any of the four, also treat the server as untrusted at the boundary regardless of version: do not expose /v1/tools/run beyond loopback, and require authentication in front of it — CVE-2025-51482 is remote code execution reachable through that endpoint. CVE-2026-4965 being an incomplete fix for CVE-2025-6101 is a reason to verify the behaviour yourself rather than rely on a version number alone.

To confirm the finding is gone, report only this rule:

agent-audit-kit scan . --rules AAK-MCP-LETTA-CVE-2025-51482-001

Limitations

Reads letta in requirements*.txt at any depth and, at the project root only, in pyproject.toml, Pipfile, package.json, .mcp.json, mcp.json, claude_desktop_config.json and the Pipfile.lock, poetry.lock, uv.lock, package-lock.json, pnpm-lock.yaml and yarn.lock lockfiles, taking the lowest version a range allows and reporting a reference that states no version. The dependency is not read when it is declared in a sub-directory manifest (services/api/pyproject.toml) or in a lockfile format the reader does not parse (pdm.lock). A compose file's letta/letta image tag is not read. A file over 2 MB, or a lockfile over 32 MiB, is not read. A declaration nested more than 64 levels deep in package.json, a TOML manifest or an MCP config (an MCP server more than 62) is still judged, and reported without a line; a lockfile entry keeps its line at any depth.

References


All rules. This page is generated from the rule registry when the documentation is built; to change it, change the rule in agent_audit_kit/rules/builtin.py. To give the rule a hand-written write-up, add docs/rules/AAK-MCP-LETTA-CVE-2025-51482-001.md: the page then shows that text, with the registry reference appended under it.