Live threats

All CVEs / Gruntjs

CVE-2022-1537Gruntjs Grunt

High 7.0

Priority
42
CVSS 3.1
7.0
EPSS
0.3%
probability of exploitation in 30 days · percentile 11
Auth required
Yes
Published
May 10, 2022
Updated
Jun 17, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-367
Vector
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H

What happens

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.

Original NVD text.

What to do

  1. Apply the vendor's security update for Grunt.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
npm grunt < 1.5.3 1.5.3 npm install grunt@1.5.3

Per OSV / GitHub Advisories (GHSA-rm36-94g8-835r). Check the version in your lockfile before upgrading.

Affected products (CPE)

VendorProductVersions
gruntjsgrunt< 1.5.3

Official sources

References

Links published by the sources. Open them with care.