VDB

CVE-2022-1537

CVE-2022-1537 PUBLISHED CVSS 7.8 HIGH

Race Condition in Grunt

Reported by @huntrdev · Published May 10, 2022

grunt is fixed in 1.5.3 (npm)

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.

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
gruntnpm1.5.3
grunt-cliArch Linux1.5.3-1
gruntgruntjs1.5.3
gruntjs/gruntgruntjs1.5.3

Risk scores

CVSS 3.0
7.8
CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Affected products

VendorProductVersions
gruntjsgruntjs/gruntunspecified
gruntjsgruntjs/grunt*
npmgrunt0
chainguardcode-server*
gruntjsgrunt
archgrunt-cli0
wolficode-server*

Timeline

  • May 10, 2022 CVE Published
  • May 11, 2022 EPSS Score (30 in total, the first dated here)
  • Mar 9, 2026 Security Advisory (13 in total, the first dated here)
  • Jul 11, 2026 Coalition ESS Score
  • Aug 9, 2026 CVE Updated
  • Aug 12, 2026 Distribution Patch (12 in total, the first dated here)

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2022-1537
vulnetix vdb fixes CVE-2022-1537

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2022-1537/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›