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.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| gruntjs | gruntjs/grunt | unspecified – < 1.5.3 | 1.5.3 |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | grunt | 1.5.3-1 | — |
| Debian 13 | grunt | 1.5.3-1 | — |
| Debian 12 | grunt | 1.5.3-1 | — |
| Debian 10 | grunt | 1.0.1-8+deb10u2 | DLA-3383-1 |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro 22.04 LTS | grunt | 1.4.1-2ubuntu0.1~esm1 | USN-5847-1 |
| Ubuntu Pro 20.04 LTS | grunt | 1.0.4-2ubuntu0.1~esm1 | USN-5847-1 |
| Ubuntu Pro 18.04 LTS | grunt | 1.0.1-8ubuntu0.1+esm1 | USN-5847-1 |
Azure Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Azure Linux 3 | js-jquery | No fix yet | — |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| npm | grunt | < 1.5.3 | 1.5.3 | GHSA-rm36-94g8-835r |
Advisories 3
- WID-SEC-2026-2460 Atlassian Bamboo, Bitbucket, Confluence, Fisheye, Crucible, Jira und Jira Service Management: Mehrere Schwachstellen BSI CERT-Bund (WID) · Oct 1, 2026
- USN-5847-1 grunt vulnerabilities Ubuntu Security Notices (USN) · Apr 27, 2026
- DLA-3383-1 grunt - security update Debian Security (DSA / DLA) · Mar 9, 2026