CVE-2021-22539

Code execution in VSCode-bazel via malicious Bazel config files

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.

Remediation

Solution:

  • Upgrade vscode-bazel to version 0.4.1 or above

Categories

8.2
CVSS
Severity: High
CVSS 3.1 •
CVSS 2.0 •
EPSS 0.08%
Third-Party Advisory github.com
Affected: Google LLC VSCode-Bazel
Published at:
Updated at:

References

Frequently Asked Questions

What is the severity of CVE-2021-22539?
CVE-2021-22539 has been scored as a high severity vulnerability.
How to fix CVE-2021-22539?
To fix CVE-2021-22539: Upgrade vscode-bazel to version 0.4.1 or above
Is CVE-2021-22539 being actively exploited in the wild?
As for now, there are no information to confirm that CVE-2021-22539 is being actively exploited. According to its EPSS score, there is a ~0% probability that this vulnerability will be exploited by malicious actors in the next 30 days.
What software or system is affected by CVE-2021-22539?
CVE-2021-22539 affects Google LLC VSCode-Bazel.
This platform uses data from the NIST NVD, MITRE CVE, MITRE CWE, First.org and CISA KEV but is not endorsed or certified by these entities. CVE is a registred trademark of the MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. CWE is a registred trademark of the MITRE Corporation and the authoritative source of CWE content is MITRE's CWE web site.
© 2025 Under My Watch. All Rights Reserved.