CVE-2022-1537
published high CVSS 3.0 · 7.8file.copy operations in GruntJS are vulnerable to a TOCTOU race condition leading to arbitrary file write in gruntjs/grunt
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| gruntjs | — | gruntjs/gruntunspecified to < 1.5.3 | Affected | Not stated | @huntrdev |
| Debian | buster | grunt | Advisory build | 1.0.1-8+deb10u2 | DLA-3383-1 |
| Ubuntu | bionic | grunt | Advisory build | 1.0.1-8ubuntu0.1+esm1 | USN-5847-1 |
| Ubuntu | focal | grunt | Advisory build | 1.0.4-2ubuntu0.1~esm1 | USN-5847-1 |
| Ubuntu | jammy | grunt | Advisory build | 1.4.1-2ubuntu0.1~esm1 | USN-5847-1 |
Description
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.0
- Base score
- 7.8 / 10
- Severity
- high
- Provider
- @huntrdev · cna
- Vector string
- CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| gruntjs | gruntjs/grunt | unspecified to < 1.5.3 (affected · custom) | @huntrdev · cna |
Weaknesses
1- CWE-367 CWE-367 Time-of-check Time-of-use (TOCTOU) Race Condition
References
3- https://github.com/gruntjs/grunt/commit/58016ffac5ed9338b63ecc2a63710f5027362bae
- https://huntr.dev/bounties/0179c3e5-bc02-4fc9-8491-a1a319b51b4d
- [debian-lts-announce] 20230405 [SECURITY] [DLA 3383-1] grunt security update https://lists.debian.org/debian-lts-announce/2023/04/msg00006.html
Provider assertions
2@huntrdev · cna
file.copy operations in GruntJS are vulnerable to a TOCTOU race condition leading to arbitrary file write in gruntjs/grunt
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.1
- Searchable
- yes
- Content hash
- 9898193cbb3ff763c0f9bc6de24d5dbb1609c284587abeb0ec92e93da63a831a
- Ingested
- 23 Sep 2026, 07:57:48 UTC
- Source record
- Official CVE record