{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2022-1537","id":"CVE-2022-1537","title":"file.copy operations in GruntJS are vulnerable to a TOCTOU race condition leading to arbitrary file write in gruntjs/grunt","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 cre","descriptionLong":"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.","published":"2022-05-10T00:00:00.000Z","updated":"2026-10-28T02:30:40.931644558Z","reserved":"2022-04-29T00:00:00.000Z","status":"Modified","rejected":false,"assigner":"@huntrdev","metric":{"version":"3.1","score":7,"vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"NVD"},"metrics":[{"version":"3.1","score":7,"vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"NVD"},{"version":"3.1","score":7,"vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"GitHub"},{"version":"3.0","score":7.8,"vector":"CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"@huntrdev"},{"version":"3.0","score":7.8,"vector":"CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"huntr.dev"},{"version":"3.0","score":7.8,"vector":"CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"OSV"},{"version":"2.0","score":6.9,"vector":"AV:L/AC:M/Au:N/C:C/I:C/A:C","rating":"medium","source":"NVD"}],"rating":"high","products":["gruntjs/grunt"],"affectedProducts":[{"vendor":"gruntjs","product":"gruntjs/grunt","defaultStatus":null,"versions":[{"version":"unspecified","lessThan":"1.5.3","status":"affected","versionType":"custom"}],"platforms":[]}],"packages":[{"ecosystem":"npm","name":"grunt","purl":"pkg:npm/grunt","ranges":["<1.5.3"],"fixed":["1.5.3"],"advisory":"GHSA-rm36-94g8-835r"}],"cwes":["CWE-367"],"aliases":["GHSA-rm36-94g8-835r"],"references":[{"url":"https://huntr.dev/bounties/0179c3e5-bc02-4fc9-8491-a1a319b51b4d","tags":["x_transferred","Exploit","Issue Tracking","Patch","Technical Description","web"]},{"url":"https://github.com/gruntjs/grunt/commit/58016ffac5ed9338b63ecc2a63710f5027362bae","tags":["x_transferred","Patch","Technical Description","fix","web"]},{"url":"https://lists.debian.org/debian-lts-announce/2023/04/msg00006.html","tags":["mailing-list","x_transferred","article","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/1xxx/CVE-2022-1537.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-1537","tags":["advisory"]},{"url":"https://github.com/gruntjs/grunt","tags":["package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":true,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":null,"epss":0.00302,"epssPercentile":0.23347,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2022-1537","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-1537","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2022-1537","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-rm36-94g8-835r","ok":true,"note":"GHSA-rm36-94g8-835r"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2022-1537","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}