Path Traversal Vulnerability in Grunt Package: CVE-2022-0436

grunt Updated 02 Oct 2025

Summary

12/04/2022
N/A
Yes i
Medium
5.5

CVE-2022-0436: Path Traversal in GitHub repository gruntjs/grunt prior to 1.5.2. Affects grunt across 2 version ranges.

< 1.3.0-1+deb11u1 < aad3d4521c3098fb255fb2db8f2e1d691a033665

Fixed in 1.3.0-1+deb11u1. 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 Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Grunt is a JavaScript task runner that automates repetitive tasks such as minification, compilation, unit testing, and linting. It is widely used in web development to streamline workflows and improve efficiency. The vulnerability CVE-2022-0436 affects Grunt versions prior to 1.5.2, allowing attackers to exploit path traversal issues, potentially leading to unauthorized file access.

Vulnerability Detail

CVE-2022-0436 is a path traversal vulnerability discovered in the Grunt package. This vulnerability allows an attacker to manipulate file paths, enabling them to access files outside the intended directory. The issue arises from improper validation of file paths, which can lead to unauthorized access to sensitive files on the server. If exploited, this could result in data leakage or further attacks on the system.

How To Fix

Minimum fixed version

1.3.0-1+deb11u1

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

If immediate upgrading is not feasible, consider restricting file access permissions on your server to mitigate the risk of exploitation. Additionally, validate and sanitize all file paths in your application to prevent unauthorized access.

Conclusion

The CVE-2022-0436 vulnerability in the Grunt package poses significant risks due to its path traversal nature. It is crucial for users to update their Grunt installations to the latest secure versions to protect against potential attacks. Utilizing tools like Vulert can help monitor and alert for such vulnerabilities in real-time.

See every vulnerability recorded for grunt →

Share this vulnerability

FAQ

CVE-2022-0436 is a path traversal vulnerability in the Grunt package that allows attackers to access files outside the intended directory.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

Exploitation of this vulnerability could lead to unauthorized access to sensitive files, data leakage, or further attacks on the system.

You can update the Grunt package on Debian systems by running 'sudo apt-get update' followed by 'sudo apt-get install grunt' in your terminal.

Yes, you can restrict file access permissions on your server and validate all file paths in your application to reduce the risk of exploitation.

Related vulnerabilities

Recent vulnerabilities recorded for grunt.

How To Fix

Minimum fixed version

1.3.0-1+deb11u1

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