CVE-2022-1537

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.
TOCTOU
ProviderTypeBase ScoreAtk. VectorAtk. ComplexityPriv. RequiredVector
NISTPrimary
7 HIGH
LOCAL
HIGH
LOW
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
Base Score
CVSS 3.x
EPSS Score
Percentile: 20.82%
Affected Products (NVD)
VendorProductVersion
gruntjsgrunt
𝑥
< 1.5.3
𝑥
= Vulnerable software versions
Debian logo
Debian Releases
Debian Product
Codename
grunt
bookworm
1.5.3-2
fixed
bullseye
1.3.0-1+deb11u2
fixed
sid
1.6.1-1
fixed
trixie
1.6.1-1
fixed
Ubuntu logo
Ubuntu Releases
Ubuntu Product
Codename
grunt
bionic
Fixed 1.0.1-8ubuntu0.1+esm1
released
focal
Fixed 1.0.4-2ubuntu0.1~esm1
released
impish
ignored
jammy
Fixed 1.4.1-2ubuntu0.1~esm1
released
kinetic
not-affected
lunar
not-affected
mantic
not-affected
noble
not-affected
trusty
dne
xenial
dne