CVE-2022-1537
HIGH 7.0CVSS 3.1Race Condition in Grunt
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.
- Published
- 10 May 2022
- Last modified
- 10 Sep 2026
- Assigned by
- security@huntr.dev
- NVD status
- Modified
- Weakness
- CWE-367
- Also known as
- GHSA-rm36-94g8-835r
- Sources
- NVDJSONOSV GHSA-rm36-94g8-835rJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | HIGH 7.0 | CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H |
| OSV | GitHub | CVSS 3.1 | HIGH 7.0 | CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H |
| NVD | security@huntr.dev (Secondary) | CVSS 3.0 | HIGH 7.8 | CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | MEDIUM 6.9 | AV:L/AC:M/Au:N/C:C/I:C/A:C |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | gruntjs | gruntcpe:2.3:a:gruntjs:grunt:*:*:*:*:*:node.js:*:* |
< 1.5.3 | 1.5.3 |
| OSV | npm | grunt | < 1.5.3 | 1.5.3 |
References
- https://github.com/gruntjs/grunt/commit/58016ffac5ed9338b63ecc2a63710f5027362bae · Patch, Technical Description, WEB
- https://huntr.dev/bounties/0179c3e5-bc02-4fc9-8491-a1a319b51b4d · Exploit, Issue Tracking, Patch, Technical Description, WEB
- https://lists.debian.org/debian-lts-announce/2023/04/msg00006.html · WEB
- https://nvd.nist.gov/vuln/detail/CVE-2022-1537 · ADVISORY
- https://github.com/gruntjs/grunt · PACKAGE
History
- 25 Nov 2026 20:34 UTC · NVD: first stored (published 10 May 2022)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 11 May 2022)