# CVE-2022-1537: grunt: file.copy operations in GruntJS are vulnerable to a TOCTOU race condition leading to arbitrary file write in GitHub r...

CVE-2022-1537 is fixed in grunt on 1 platform, first by grunt 1.0.1-8ubuntu0.1+esm1, released May 10, 2022. It is not reported as exploited. Patch Radar priority: High.

- Web page: https://patchblox.com/security/cve/CVE-2022-1537
- Priority: High
- CVSS: 7.0 (high)
- EPSS: 0.0030
- CISA KEV: not listed
- Exploited (vendor report): no
- Publicly disclosed: no
- Published: May 10, 2022

## Description

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.

## Where it's fixed

| Platform | Product | Fixed in | Fix | Released |
|---|---|---|---|---|
| Linux | grunt Debian 12.15 (bookworm) | 1.5.3-1 | [DEBIAN-CVE-2022-1537](https://patchblox.com/security/data/fix/linux/debian-cve-2022-1537.md) | May 10, 2022 |
| Linux | grunt Debian 13.5 (trixie) | 1.5.3-1 | [DEBIAN-CVE-2022-1537](https://patchblox.com/security/data/fix/linux/debian-cve-2022-1537.md) | May 10, 2022 |
| Linux | grunt Debian 14 | 1.5.3-1 | [DEBIAN-CVE-2022-1537](https://patchblox.com/security/data/fix/linux/debian-cve-2022-1537.md) | May 10, 2022 |
| Linux | grunt Ubuntu 18.04.6 LTS (bionic) | 1.0.1-8ubuntu0.1+esm1 | [grunt 1.0.1-8ubuntu0.1+esm1](https://patchblox.com/security/data/fix/linux/ubuntu-bionic-grunt-1.0.1-8ubuntu0.1-esm1.md) | May 10, 2022 |
| Linux | grunt Ubuntu 20.04 LTS (focal) | 1.0.4-2ubuntu0.1~esm1 | [grunt 1.0.4-2ubuntu0.1~esm1](https://patchblox.com/security/data/fix/linux/ubuntu-focal-grunt-1.0.4-2ubuntu0.1-esm1.md) | May 10, 2022 |
| Linux | grunt Ubuntu 22.04.1 LTS (jammy) | 1.4.1-2ubuntu0.1~esm1 | [grunt 1.4.1-2ubuntu0.1~esm1](https://patchblox.com/security/data/fix/linux/ubuntu-jammy-grunt-1.4.1-2ubuntu0.1-esm1.md) | May 10, 2022 |

---

Data as of 2026-11-08T06:59:42Z UTC. Source: Patchblox Patch Radar (https://patchblox.com/security/patch-radar). Patchblox finds out-of-date software on Windows, macOS and Linux and updates it through release rings: https://patchblox.com/demo

Free to use with attribution: show "Data: Patchblox Patch Radar" with a link to https://patchblox.com/security/patch-radar. Terms, including what needs a written agreement: https://patchblox.com/security/patch-radar/use-the-data

Product names, logos and trademarks shown on Patch Radar belong to their respective owners. They are used only to identify the software each security fix applies to and to help readers find their platform. Their use does not imply any affiliation with, or endorsement by, those owners, and Patchblox is not affiliated with any of them.
