CVE-2022-1537
Race Condition in Grunt
Reported by @huntrdev · Published May 10, 2022
grunt is fixed in 1.5.3 (npm)
file.copy operations in GruntJS are vulnerable to a TOCTOU race condition leading to arbitrary file write in GitHub repository gruntjs/grunt prior to 1.5.3. This vulnerability is capable of arbitrary file writes which can lead to local privilege escalation to the GruntJS user if a lower-privileged user has write access to both source and destination directories as the lower-privileged user can create a symlink to the GruntJS user's .bashrc file or replace /etc/shadow file if the GruntJS user is root.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| grunt | npm | 1.5.3 |
| grunt-cli | Arch Linux | 1.5.3-1 |
| grunt | gruntjs | 1.5.3 |
| gruntjs/grunt | gruntjs | 1.5.3 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| gruntjs | gruntjs/grunt | unspecified |
| gruntjs | gruntjs/grunt | * |
| npm | grunt | 0 |
| chainguard | code-server | * |
| gruntjs | grunt | |
| arch | grunt-cli | 0 |
| wolfi | code-server | * |
Timeline
- May 10, 2022 CVE Published
- May 11, 2022 EPSS Score (30 in total, the first dated here)
- Mar 9, 2026 Security Advisory (13 in total, the first dated here)
- Jul 11, 2026 Coalition ESS Score
- Aug 9, 2026 CVE Updated
- Aug 12, 2026 Distribution Patch (12 in total, the first dated here)
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2022-1537
vulnetix vdb fixes CVE-2022-1537
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2022-1537/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart