Time-of-check time-of-use race condition in gruntjs/grunt
Key facts
- Attack vector
- Local
- Privileges required
- Low
- User interaction
- None
- Attack complexity
- High
- Impact type
- —
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Partial Red Hat: 3 without a fix
Attack profile from CVSS 3.1 · NVD. Fix status from CNA, GitHub and Red Hat.
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.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| gruntjs | gruntjs/grunt | before 1.5.3 | 1.5.3 | Patch available | CNA |
| — | grunt (npm) | before 1.5.3 | 1.5.3 | Patch available | GHSA-rm36-94g8-835r |
- gruntjs/grunt Vendorgruntjs Affected before 1.5.3 Fixed in 1.5.3 Patch available CNA
- grunt (npm) Vendor— Affected before 1.5.3 Fixed in 1.5.3 Patch available GHSA-rm36-94g8-835r
Remediation
- Fix · CNA gruntjs/grunt (gruntjs) Fixed in 1.5.3
- Fix · GHSA-rm36-94g8-835r grunt (npm) Fixed in 1.5.3 Advisory →
Vendor assessments
Red Hat
Red Hat rating: Important. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| OpenShift Service Mesh 2.0 | Affected | No fix yet |
| OpenShift Service Mesh 2.1 | Affected | No fix planned: Will not fix |
| Red Hat JBoss Data Grid 7 | Affected | No fix planned: Out of support scope |
Not affected: 3 products
- Red Hat Enterprise Linux 8
- Red Hat JBoss Enterprise Application Platform 7
- Red Hat JBoss Enterprise Application Platform Expansion Pack
Timeline
- 2026-10-02 Threatist record created from CVE-2022-1537
- 2026-10-03 Alias added: GHSA-rm36-94g8-835r
References
More gruntjs Grunt vulnerabilities
- TI-2020-06248 Arbitrary code execution in grunt CVSS 3.1HIGH 7.1
- TI-2022-00360 Path Traversal in gruntjs/grunt CVSS 3.1MEDIUM 5.5
Sources
- CVE-2022-1537 · CVE Program
- CVE-2022-1537 · NVD
- FIRST EPSS
- GHSA-rm36-94g8-835r · GitHub Advisory Database · CC BY 4.0
- CVE-2022-1537 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences