Grunt - Local Privilege Escalation Vulnerability

grunt Updated 02 Oct 2025

Summary

05/04/2023
N/A
Yes i
Unrated
Not published

DLA-3383-1: grunt - security update. Affects grunt versions < 1.0.1-8+deb10u2. Fixed in 1.0.1-8+deb10u2. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

GruntJS is a multipurpose task runner and build system tool widely used in the development community. It provides a flexible and efficient way to automate various tasks during the development process. However, a vulnerability has been discovered in GruntJS that could potentially allow local privilege escalation.

Vulnerability Detail

The vulnerability in GruntJS is related to the 'file.copy' operations, which are susceptible to a TOCTOU (time-of-check vs. time-of-use) race condition. This race condition could be exploited by an attacker to perform arbitrary file writes in GitHub repositories. If a lower-privileged user has write access to both the source and destination directories, they could create a symlink to the GruntJS user's configuration file, such as '~/.bashrc', potentially leading to local privilege escalation. In more severe cases, if the GruntJS user is root, the attacker could replace critical system files like '/etc/shadow'. This vulnerability has been assigned CVE-2022-1537.

How To Fix

Minimum fixed version

1.0.1-8+deb10u2

This is the first release that contains the fix.

sudo apt-get install --only-upgrade grunt

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

There is no specific workaround mentioned for this vulnerability. The recommended solution is to apply the available security update.

Conclusion

The vulnerability in GruntJS could potentially allow local privilege escalation if exploited by an attacker with write access to both the source and destination directories. It is crucial to update the GruntJS package to the latest version to mitigate this vulnerability. For further support and assistance in vulnerability remediation, you can reach out to DevNack.com.

See every vulnerability recorded for grunt →

Share this vulnerability

FAQ

GruntJS is a popular task runner and build system tool used in web development projects. It helps automate various tasks, making the development process more efficient.

TOCTOU stands for 'time-of-check vs. time-of-use' and refers to a race condition where the outcome of an operation depends on the timing of certain checks and uses. In this case, the vulnerability in GruntJS is due to a TOCTOU race condition in the 'file.copy' operations.

The vulnerability in GruntJS could allow an attacker with write access to both the source and destination directories to perform arbitrary file writes. This could lead to local privilege escalation, enabling the attacker to gain higher privileges on the system.

You can use the Vulert Playground at Vulert Scanner to check if your GruntJS installation is affected by this vulnerability. Vulert monitors and alerts in real-time for open-source vulnerabilities, using just a manifest file like package-lock.json.

You can find more information about this vulnerability, including the CVE identifier, in the Debian LTS security advisory DLA-3383-1. The advisory provides details on the vulnerability, its impact, and the recommended fix.

Related vulnerabilities

Recent vulnerabilities recorded for grunt.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

Minimum fixed version

1.0.1-8+deb10u2

This is the first release that contains the fix.

sudo apt-get install --only-upgrade grunt

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback