CVE-2022-1537

Source
https://nvd.nist.gov/vuln/detail/CVE-2022-1537
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-1537.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2022-1537
Aliases
Downstream
Published
2022-05-10T00:00:00Z
Modified
2025-12-04T10:03:00.558781Z
Severity
  • 7.8 (High) CVSS_V3 - CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H CVSS Calculator
Summary
file.copy operations in GruntJS are vulnerable to a TOCTOU race condition leading to arbitrary file write in gruntjs/grunt
Details

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.

Database specific
{
    "cna_assigner": "@huntrdev",
    "cwe_ids": [
        "CWE-367"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/1xxx/CVE-2022-1537.json"
}
References

Affected packages

Git / github.com/gruntjs/grunt

Affected ranges

Type
GIT
Repo
https://github.com/gruntjs/grunt
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Fixed

Affected versions

v0.*

v0.4.0
v0.4.1
v0.4.2
v0.4.3
v0.4.4
v0.4.5

v1.*

v1.0.0
v1.0.0-rc1
v1.0.1
v1.0.2
v1.0.3
v1.0.4
v1.1.0
v1.2.0
v1.2.1
v1.3.0
v1.4.0
v1.4.1
v1.5.0
v1.5.1
v1.5.2