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

- Priority: **Routine**
- Reason: Not severe (CVSS 8.2, local access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2021-04-16 · Modified: 2024-09-17
- Record: https://cvemate.com/vulnerability/CVE-2021-22539 · JSON: https://cvemate.com/vulnerability/CVE-2021-22539/json

## Description

```text
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.
```

## Signals

- CVSS: 8.2 high (v3.1, CVE.org) CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H
- EPSS: 0.31%, percentile 25.714%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected

- google llc vscode-bazel: ≥ unspecified, ≤ 0.4.0
- google bazel: ≥ 0.1.0, \< 0.4.1

## References

- <https://github.com/bazelbuild/vscode-bazel/security/advisories/GHSA-2rcw-j8x4-hgcv>
- <https://github.com/bazelbuild/vscode-bazel-ghsa-2rcw-j8x4-hgcv/pull/1>

---

Data as of 2026-12-05T09:58:01.231Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
