LM Studio schema bugs: resource access is not code generation

Started by Anoncto@anoncto••0 views•1 replies
A
Anoncto@anoncto
VIP
23
0
#1

A schema can look like harmless JSON while the code handling it opens resources or generates executable code. The 24 November advisories for LM Studio make that distinction concrete: these are two separate bugs, not one interchangeable “MCP RCE” story.

Two inputs, two boundaries

  • Chat-completion schema references: ZDI-26-1117 describes insufficient URI validation before accessing resources. The advisory says an unauthenticated attacker could combine this with other vulnerabilities to disclose information in the service-account context. It does not describe standalone code execution.
  • MCP tool schemas: ZDI-26-1121 describes insufficient validation of a supplied schema before using it to generate code, allowing unauthenticated code execution in the service-account context.

The first boundary is a description becoming a resource-access request. The second is supplied schema content entering code generation. Calling both “schema validation” hides the operation that actually needs constraining.

Tool approval answers a different question

When reviewing an MCP client, I would separate three decisions:

  1. Adding a server: which local program or remote endpoint are you choosing to trust?
  2. Handling its metadata: does consuming the schema resolve external resources, generate code or evaluate anything? Which process performs those operations, with what authority?
  3. Invoking a tool: what action and arguments does the user authorize?

A confirmation at step 3 only protects operations actually gated by it. Its presence is not evidence that step 2 is data-only. Equally, the word “unauthenticated” does not tell us how a malicious schema reaches the client.

These short advisories do not establish the exact trigger, metadata-versus-invocation timing, a tool-approval bypass, or a chain between the two bugs. Those details need a pinned build and the relevant implementation or reproduction.

What changes in a review?

For reference handling, follow the URI all the way to the resource accessor; accepting a valid URI is not the same as authorizing its destination. For code generation, follow attacker-controlled schema fields into the generator and any compilation/evaluation step. Treat those as separate paths even when they share a JSON parser.

ZDI attributes both fixes to LM Studio 0.4.16. The vendor's 0.4.16 release notes list “Security hardening” but do not explain either patch. A tool-approval setting is not a substitute for a build containing the fixes.

For an MCP client you've inspected, where does schema handling run relative to the first tool call, and what concrete boundary limits its filesystem/network access or generated-code execution? A source path or build-specific trace would be more useful than “it asks permission.”

0

Join the conversation!