Skip to content
Fencer Intel
high 7.8

CVE-2022-1537 json

file.copy operations in GruntJS are vulnerable to a TOCTOU race condition leading to arbitrary file write in gruntjs/grunt

published 4y ago modified last mo. also GHSA-rm36-94g8-835r , EUVD-2022-5193

cvss
7.8
version 3.0, CNA
cisa kev
Not listed
not in CISA's catalog
epss
0.3%
EPSS 0.3% chance of exploitation in 30 days, percentile 23%
public exploits
0
none known

Summary

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.

Patch / fix

  • npm grunt 1.5.3
  • gruntjs gruntjs/grunt 1.5.3
  • grunt Debian 14, Debian 13, Debian 12 1.5.3-1

debian advisories DEBIAN-CVE-2022-1537

  • grunt Ubuntu Pro 18.04 LTS 1.0.1-8ubuntu0.1+esm1
  • grunt Ubuntu Pro 20.04 LTS 1.0.4-2ubuntu0.1~esm1
  • grunt Ubuntu Pro 22.04 LTS 1.4.1-2ubuntu0.1~esm1

ubuntu advisories UBUNTU-CVE-2022-1537

Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • grunt-cli Arch Linux 1.5.3-1

arch linux advisories AVG-2827

Is CVE-2022-1537 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.

Check with Fencer

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2022-1537 updated cvss 7.8

gruntjs: race condition leading to arbitrary file write

  • Red Hat OpenShift Service Mesh 2.0 servicemesh-grafana, servicemesh-grafana-prometheus
    affected: no fix available
  • Red Hat OpenShift Service Mesh 2.1 servicemesh-grafana
    affected: no fix planned “Will not fix”
  • Red Hat JBoss Data Grid 7 gruntjs gruntjs
    affected: no fix planned “Out of support scope”
  • Red Hat Enterprise Linux 8 grafana, grafana-loki, grafana-mssql, grafana-mysql, grafana-selinux, grafana-graphite, +8 more Red Hat JBoss Enterprise Application Platform 7 org.jboss.hal-hal-parent Red Hat JBoss Enterprise Application Platform Expansion Pack gruntjs gruntjs
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

Exploit prediction

0.30% chance of exploitation in the next 30 days, higher than 23% of all scored CVEs (FIRST EPSS, 2026-11-09).

Exploits and checks

  • huntr.dev https://huntr.dev/bounties/0179c3e5-bc02-4fc9-8491-a1a319b51b4d referenced PoC, tagged "exploit" by a source, unverified

CVSS scores

assigned by version score vector
CNA 3.0 7.8 CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
NVD 3.1 7.0 CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
NVD 2.0 6.9 AV:L/AC:M/Au:N/C:C/I:C/A:C
GitHub 3.1 7.0 CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H

Affected packages

ecosystem package affected fixed in
npm grunt
<1.5.3
1.5.3

Affected products

  • gruntjs gruntjs/grunt

Classification

Weakness
  • CWE-367 Time-of-check Time-of-use (TOCTOU) Race Condition

References

Sources

Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.