CVE-2022-1537Gruntjs Grunt
High 7.0
Follow: this CVE · Gruntjs · Gruntjs Grunt We alert you by email or Slack (account required).
- 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.
What to do
- Apply the vendor's security update for Grunt.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How 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)
| Vendor | Product | Versions |
|---|---|---|
| gruntjs | grunt | < 1.5.3 |
Official sources
References
Links published by the sources. Open them with care.
- github.com Patch Technical Description
- huntr.dev Exploit Issue Tracking Patch
- lists.debian.org