CVE-2021-22539 Code execution in VSCode-bazel via malicious Bazel config files
Attackers can execute arbitrary code by placing a malicious JSON config file in the project folder, affecting VSCode Bazel extension users.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- A user has to click or open something
- Fix
- None listed
What is CVE-2021-22539?
CVE-2021-22539 is a high-severity code injection vulnerability in Google LLC VSCode-Bazel, published on 16 Apr 2021. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Official description
An attacker can place a crafted JSON config file into the project folder pointing to a custom executable. VScode-bazel allows the workspace path to lint *.bzl files to be set via this config file. As such the attacker is able to execute any executable on the system through vscode-bazel. We recommend upgrading to version 0.4.1 or above.
Which versions are affected by CVE-2021-22539?
It affects 1 product.
Products include Google Bazel.
How do I fix CVE-2021-22539?
No fix has been published for CVE-2021-22539 yet. Limit exposure of the affected software until one is available.
Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.
Is CVE-2021-22539 being exploited?
There is no known exploitation of CVE-2021-22539 in the wild and no public exploit code.
Other vulnerabilities in Google LLC VSCode-Bazel
Sources
Also known as GHSA-2rcw-j8x4-hgcv.