(Pwn2Own) LM Studio Plugin Sandbox Directory Traversal Arbitrary File Creation Vulnerability
The plugin sandbox in LM Studio did not properly validate a user-supplied path before using it in file operations, allowing an authenticated attacker to create arbitrary files. This could be leveraged to execute arbitrary code in the context of the service account.
Originally disclosed on Zero Day Initiative
This vulnerability allows remote attackers to create arbitrary files on affected installations of LM Studio. Authentication is required to exploit this vulnerability.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the plugin sandbox joined or used a user-supplied path without normalising it or confirming it stayed inside the intended directory.
Impact
An authenticated attacker could create arbitrary files and potentially execute code as the service account.
What the attacker needed
Authentication required; plugin sandbox in use
The fix
It was fixed in LM Studio 0.4.16.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
A plugin sandbox is meant to keep plugins from touching files they should not. Here, a path supplied by the user was used without checking it, so someone with an account could make the program write files anywhere it had permission. That can lead to running their own code on the machine.
What is Path traversal?
Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.