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

- Severity: High 8.2 (CVSS:3.1, scored by Google) `CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.31%, higher than 25% of CVEs (2026-12-01)
- Published: 2021-04-16T10:15:12.912Z
- Modified: 2026-06-17T03:37:24.203Z
- Weaknesses: CWE-73, CWE-668
- Assigned by: Google

## 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.

(As written by CVE List.)

## Affected

- Google LLC VSCode-Bazel: from unspecified up to 0.4.0
- google bazel: from 0.1.0 before 0.4.1

## Every score

- Google: CVSS:3.1 8.2 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H`
- NVD: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- NVD: CVSS:2.0 6.8 Medium `AV:N/AC:M/Au:N/C:P/I:P/A:P`

## References

- <https://github.com/bazelbuild/vscode-bazel/security/advisories/GHSA-2rcw-j8x4-hgcv> (third-party-advisory)
- <https://github.com/bazelbuild/vscode-bazel-ghsa-2rcw-j8x4-hgcv/pull/1> (broken-link)

## Sources

- CVE List: [CVE-2021-22539](https://www.cve.org/CVERecord?id=CVE-2021-22539), CVE Terms of Use, modified 2024-09-17
- NVD: [CVE-2021-22539](https://nvd.nist.gov/vuln/detail/CVE-2021-22539), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-22539 · Whole record: https://cve.day/CVE-2021-22539.json · Rebuilt by cve.day 2026-11-25T22:58:00.844Z
