CVE-2021-22539: Code execution in VSCode-bazel via malicious Bazel config files
Vulnerability summary
CVE-2021-22539 is a high (CVSS 8.2) External Control of File Name or Path vulnerability in google llc vscode-bazel. EPSS estimates a 0.31% chance of exploitation in the next 30 days, higher than 25.7% of scored vulnerabilities.
Not severe (CVSS 8.2, local access); no exploitation reported by the 5 checked sources
Source freshness unavailable
How is this decided?Timeline
- 16-04-2021PublishedVulnerability first disclosed.
- 17-09-2024Last modifiedVulnerability information updated.
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.
CVSS metrics
3 scores · 2 sources · 2 versions- NVDNIST7.8HighCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:HDiffers
EPSS trend
Probability
0.31%
Chance of exploitation in the next 30 days
Percentile
26%
Versus all other CVEs
30-day change
No change 0.00 pp
From 0.31% on 04-11-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root cause- CWE-73External Control of File Name or PathThe product allows user input to control or influence paths or file names that are used in filesystem operations.
- CWE-668Exposure of Resource to Wrong SphereThe product exposes a resource to the wrong control sphere, providing unintended actors with inappropriate access to the resource.
Affected systems
Known conditions: local access, low-privilege account, user interaction (CVSS vector). Other conditions: not stated in public data.
Google1 product
- bazel≥ 0.1.0, < 0.4.1
Google llc1 product
- vscode-bazel≥ unspecified, ≤ 0.4.0
2 vendors · 2 products
References
2 links- github.com/bazelbuild/vscode-bazel/security/advisories/GHSA-2rcw-j8x4-hgcvX Refsource MISCThird Party Advisory