Vulnerability in Gruntjs Grunt
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.
Vulnerability class: TOCTOU (Time-of-Check to Time-of-Use)
Published · last modified .
CVSS v3 metric
CVSS v3 base score 7.0 (High). Vector: CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H.
EPSS exploit prediction
EPSS 0.003, 23.2th percentile (last changed ); unchanged over 30 days. About EPSS.
Affected products
- Gruntjs Grunt
- Gruntjs Gruntjs/grunt — versions unspecified
Weakness classification (CWE)
Public exploits and proof-of-concept code
Also mentioned in 4 other repositories (ARPSyndicate/cvemon, HotDB-Community/HotDB-Engine, shawnhooper/restful-localized-scripts, …). These reference the CVE in a list, notes or a scanner and are not exploit code for it.
References
- huntr.dev/bounties/0179c3e5-bc02-4fc9-8491-a1a319b51b4d (Technical Description, Exploit, Patch, Issue Tracking)
- github.com/gruntjs/grunt/commit/58016ffac5ed9338b63ecc2a63710f5027362bae (Technical Description, Patch)
- [debian-lts-announce] 20230405 [SECURITY] [DLA 3383-1] grunt security update (mailing-list)