Advisory

GHSA-rm36-94g8-835r

Also known as: CVE-2022-1537

Summary

Race Condition in Grunt

Details

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.

Severity

High Basis: The source's own band: HIGH

Dates

Published
2022-05-11 00:01 UTC
Modified
2026-09-10 03:49 UTC

Affected packages and fixes

grunt

npm · All systems

Affected

  • introduced 0, fixed 1.5.3 (semver)

Fixed versions

1.5.3

Fix

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences