# LM Studio: an MCP tool schema ran code with no authentication

> LM Studio turned an attacker's MCP tool schema into running code, with no authentication needed.

- **Severity:** High: A working attack on a widely used AI product or ecosystem. A fix may exist. Patch or mitigate this week.
- **Category:** Vulnerability
- **Published by:** Zero Day Initiative
- **Disclosed:** 2026-11-24
- **CVE:** CVE-2026-133995
- **CVSS:** 9.8
- **Affects:** LM Studio
- **Research by:** Nikolaos Mourousias (OtterSec), Caue Obici (OtterSec), Bruno Halltari (OtterSec), Billy (STARLabs SG), Pan Zhenpeng (STARLabs SG), Weiming Shi (STARLabs SG)
- **Primary source:** https://www.zerodayinitiative.com/advisories/ZDI-26-1121/
- **Page:** https://theinjection.dev/items/zdi-lm-studio-mcp-schema-code-injection/

CVE-2026-133995 let a remote attacker run code in LM Studio with no login, by handing the app an MCP tool schema that it turned into code. LM Studio fixed it in 0.4.16. ZDI published it with four more Pwn2Own findings on November 24, 2026.

## What happened

ZDI published five LM Studio advisories on November 24, 2026, all reported to the vendor on June 2, 2026 and all fixed in LM Studio 0.4.16. OtterSec is credited with the most severe, CVE-2026-133995. STARLabs SG is credited with the other four. The findings came out of Pwn2Own Berlin.

## How it works

Code injection drives the worst of the five: LM Studio generates code from an MCP tool schema without validating the schema it was given, so the generated code runs in the service account's context. The other four are a plugin sandbox path traversal that creates arbitrary files, a weak credential in the CLI identity that bypasses authentication, a schema reference that makes the app fetch an attacker's URI, and schema validation errors that return sensitive data to the caller.

## Who is affected

Anyone running LM Studio older than 0.4.16 is exposed, and ZDI lists no narrower version range. The code injection and two of the information-disclosure flaws need no authentication at all. The plugin sandbox path traversal needs high privileges.

## What to do

Update LM Studio to 0.4.16 or later, and in practice to the current release, because a separate path traversal disclosed in October 2026 was fixed after 0.4.16. ZDI lists no workaround for installations that cannot update.

## Quick facts

- **Affected:** LM Studio before 0.4.16
- **Fixed in:** LM Studio 0.4.16
- **CVE:** CVE-2026-133989, 133991, 133992, 133994, 133995
- **CVSS:** 9.8 for CVE-2026-133995, per ZDI
- **Reported:** June 2, 2026
- **Disclosed:** November 24, 2026
- **Found by:** OtterSec and STARLabs SG, at Pwn2Own Berlin

## Questions

### Which LM Studio version fixes CVE-2026-133995?

LM Studio 0.4.16 fixes CVE-2026-133995 and the four other flaws ZDI published on November 24, 2026. The vendor's changelog for 0.4.16 records the change as a single line reading Security hardening, with no detail and no CVE references. Users on any earlier build should update, because ZDI documents no workaround for installations that stay behind.

### Does CVE-2026-133995 need a password or an API key?

No. ZDI records CVE-2026-133995 as needing no privileges and no user interaction, which is why it scores 9.8. Two of the other four LM Studio flaws, the JSON schema request forgery and the validation error leak, are also unauthenticated. The plugin sandbox path traversal, CVE-2026-133994, is the one that requires high privileges.

### How does this compare to the LM Studio model downloader path traversal?

Ariel Fogel of Pillar Security found that earlier flaw, CVE-2026-119979, in LM Studio's model downloader, where a crafted model repository wrote files outside the models directory. CVE-2026-133995 sits in MCP tool schema handling instead, and turns a schema into executed code with no login. Separate components, separate CVEs, and the November batch also covers the plugin sandbox and the CLI identity.

### Were the LM Studio flaws exploited before the advisories appeared?

ZDI's five LM Studio advisories report no exploitation in the wild. Each records the same two-step timeline: reported to the vendor on June 2, 2026, then a coordinated public release on November 24, 2026. The fix was already in 0.4.16 when the technical details became public, so updating closes the exposure these advisories describe.

## Sources

1. [ZDI-26-1121 Advisory](https://www.zerodayinitiative.com/advisories/ZDI-26-1121/)
2. [ZDI-26-1120 Advisory](https://www.zerodayinitiative.com/advisories/ZDI-26-1120/)
3. [ZDI-26-1119 Advisory](https://www.zerodayinitiative.com/advisories/ZDI-26-1119/)
4. [LM Studio 0.4.16](https://lmstudio.ai/changelog/lmstudio/lmstudio-v0.4.16)
