8.2
CWE
668 73
Advisory Published
Updated

CVE-2021-22539: Code execution in VSCode-bazel via malicious Bazel config files

First published: Fri Apr 16 2021(Updated: )

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.

Credit: cve-coordination@google.com

Affected SoftwareAffected VersionHow to fix
Google Bazel>=0.1.0<0.4.1

Remedy

Upgrade vscode-bazel to version 0.4.1 or above

Never miss a vulnerability like this again

Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.

Frequently Asked Questions

  • What is the severity of CVE-2021-22539?

    CVE-2021-22539 has a medium severity, as it allows for arbitrary code execution through a crafted JSON config file.

  • How do I fix CVE-2021-22539?

    To fix CVE-2021-22539, update to Bazel version 0.4.2 or later, which addresses this vulnerability.

  • What is the impact of CVE-2021-22539?

    The impact of CVE-2021-22539 is that an attacker can execute any arbitrary executable on the system via a malicious config file.

  • Which versions of Bazel are affected by CVE-2021-22539?

    CVE-2021-22539 affects Bazel versions from 0.1.0 to 0.4.1.

  • How can an attacker exploit CVE-2021-22539?

    An attacker can exploit CVE-2021-22539 by placing a malicious JSON config file in the project folder that points to a custom executable.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2025 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203