What happened
CVE-2026-138207 is an incorrect control-flow-scoping flaw (CWE-636) in loadPermissions in src/permissions/loader.ts of letta-code, affecting versions up to 0.34.71. Attack requires local access; the exploit is published and the fixing PR is awaiting acceptance.
Why it matters
letta-code is an AI coding agent whose Permission Loader gates what tools/commands the agent may run. A local attacker who can influence the loader's control-flow scope could cause permissions to be resolved in the wrong scope, widening the set of actions the agent is allowed to take.
Attack vector
Local manipulation of the permission loader so permission scoping is resolved in the wrong scope, granting the agent broader tool/command permissions than intended.
Affected systems
letta-ai letta-code <= 0.34.71 (Permission Loader)
Mitigation
Apply the pending fix (PR that corrects loadPermissions scoping); monitor for a patched release.