Skip to content
RCE Write-up Intermediate

Vulnerability in Visual Studio Code Go extension

The VS Code Go extension could operate in Restricted Mode in ways that risked accidental execution of untrusted code. An attacker could potentially get untrusted code executed by the extension when a user opened a malicious workspace.

medium.com

Published on medium.com

The Go team has released v0.52.1 (stable) and v0.53.0 (pre-release) of the vscode-go extension to address a security issue tracked as CVE-2025–68120. The fix corrects unexpected behavior in VS Code Restricted Mode, where the extension could previously operate in ways that risked accidental execution of untrusted code.

ASAcrew Blog, on medium.com

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 write-up has not been written yet. The Original tab links to the source.

How it worked

Impact

Opening an untrusted workspace could lead to accidental execution of untrusted code; the text does not describe a specific exploit.

What the attacker needed

VS Code with the Go extension installed; victim opens an untrusted workspace

The fix

The extension was fixed by disabling it entirely in Restricted Mode, and users receive the update automatically.

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 write-up has not been written yet. The Original tab links to the source.

VS Code has a Restricted Mode for opening folders you do not trust, which is meant to stop extensions from running code automatically. The Go extension did not fully respect that mode, so opening a malicious project could lead to code running on your computer. The fix makes the extension switch itself off in Restricted Mode.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.