{"id":"CVE-2022-1537","state":"PUBLISHED","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 create a symlink to the GruntJS user's .bashrc file or replace /etc/shadow file if the GruntJS user is root.","publishedAt":"2022-05-10T00:00:00.000Z","updatedAt":"2024-08-03T00:10:03.294Z","severity":{"score":7.8,"label":"High","version":"3.0","vector":"CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"@huntrdev"},"assigner":"@huntrdev","products":["gruntjs gruntjs/grunt"],"affected":[{"vendor":"gruntjs","product":"gruntjs/grunt","versions":[{"version":"unspecified","status":"affected","lessThan":"1.5.3","versionType":"custom"}]}],"references":["https://huntr.dev/bounties/0179c3e5-bc02-4fc9-8491-a1a319b51b4d","https://github.com/gruntjs/grunt/commit/58016ffac5ed9338b63ecc2a63710f5027362bae","https://lists.debian.org/debian-lts-announce/2023/04/msg00006.html"],"weaknesses":["CWE-367"],"ingestedAt":"2026-10-29T19:49:29.138Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2022/1xxx/CVE-2022-1537.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.1","cveMetadata":{"cveId":"CVE-2022-1537","state":"PUBLISHED","datePublished":"2022-05-10T00:00:00.000Z","dateUpdated":"2024-08-03T00:10:03.294Z","assignerShortName":"@huntrdev","assignerOrgId":"c09c270a-b464-47c1-9133-acb35b22c19a","dateReserved":"2022-04-29T00:00:00.000Z"},"containers":{"cna":{"title":"file.copy operations in GruntJS are vulnerable to a TOCTOU race condition leading to arbitrary file write in gruntjs/grunt","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"gruntjs","product":"gruntjs/grunt","versions":[{"version":"unspecified","status":"affected","lessThan":"1.5.3","versionType":"custom"}]}],"references":[{"url":"https://huntr.dev/bounties/0179c3e5-bc02-4fc9-8491-a1a319b51b4d"},{"url":"https://github.com/gruntjs/grunt/commit/58016ffac5ed9338b63ecc2a63710f5027362bae"},{"url":"https://lists.debian.org/debian-lts-announce/2023/04/msg00006.html","name":"[debian-lts-announce] 20230405 [SECURITY] [DLA 3383-1] grunt security update","tags":["mailing-list"]}],"metrics":[{"cvssV3_0":{"version":"3.0","vectorString":"CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","attackVector":"LOCAL","attackComplexity":"LOW","privilegesRequired":"LOW","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH","baseScore":7.8,"baseSeverity":"HIGH"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-367","type":"CWE","lang":"en","description":"CWE-367 Time-of-check Time-of-use (TOCTOU) Race Condition"}]}],"providerMetadata":{"shortName":"@huntrdev","orgId":"c09c270a-b464-47c1-9133-acb35b22c19a","dateUpdated":"2023-04-05T00:00:00.000Z"},"source":{"advisory":"0179c3e5-bc02-4fc9-8491-a1a319b51b4d","discovery":"EXTERNAL"}},"adp":[{"title":"CVE Program Container","references":[{"url":"https://huntr.dev/bounties/0179c3e5-bc02-4fc9-8491-a1a319b51b4d","tags":["x_transferred"]},{"url":"https://github.com/gruntjs/grunt/commit/58016ffac5ed9338b63ecc2a63710f5027362bae","tags":["x_transferred"]},{"url":"https://lists.debian.org/debian-lts-announce/2023/04/msg00006.html","name":"[debian-lts-announce] 20230405 [SECURITY] [DLA 3383-1] grunt security update","tags":["mailing-list","x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-03T00:10:03.294Z"}}]}}}