CVE-2022-1537 Race Condition in Grunt

High 7.8 Published Updated

A TOCTOU race condition in GruntJS file.copy allows local attackers to perform arbitrary file writes, potentially leading to privilege escalation.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2022-1537?

CVE-2022-1537 is a high-severity vulnerability in gruntjs/grunt, published on 10 May 2022. It can only be exploited from the same machine or local network, with no action from the victim.

Official 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.

Weakness: CWE-367

Which versions are affected by CVE-2022-1537?

2 open source packages ship an affected version, including grunt. It affects 1 product.

PackageAffectedFixed in
grunt npmAll versions1.5.3
grunt npmAll versions1.5.3

Products include Gruntjs Grunt.

How do I fix CVE-2022-1537?

Upgrade grunt to 1.5.3 or later.

Is CVE-2022-1537 being exploited?

There is no known exploitation of CVE-2022-1537 in the wild and no public exploit code.

Sources

Also known as AZL-44082, DEBIAN-CVE-2022-1537, DLA-3383-1, GHSA-rm36-94g8-835r, UBUNTU-CVE-2022-1537.

Is CVE-2022-1537 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free