{"id":"UBUNTU-CVE-2022-1537","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.","modified":"2026-01-30T00:54:19.606347Z","published":"2022-05-10T14:15:00Z","related":["USN-5847-1"],"upstream":["CVE-2022-1537"],"references":[{"type":"REPORT","url":"https://ubuntu.com/security/CVE-2022-1537"},{"type":"REPORT","url":"https://huntr.dev/bounties/0179c3e5-bc02-4fc9-8491-a1a319b51b4d"},{"type":"REPORT","url":"https://github.com/gruntjs/grunt/commit/58016ffac5ed9338b63ecc2a63710f5027362bae"},{"type":"ADVISORY","url":"https://ubuntu.com/security/notices/USN-5847-1"},{"type":"REPORT","url":"https://www.cve.org/CVERecord?id=CVE-2022-1537"}],"affected":[{"package":{"name":"grunt","ecosystem":"Ubuntu:Pro:18.04:LTS","purl":"pkg:deb/ubuntu/grunt@1.0.1-8ubuntu0.1+esm1?arch=source&distro=esm-apps/bionic"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.0.1-8ubuntu0.1+esm1"}]}],"versions":["1.0.1-5","1.0.1-6","1.0.1-7","1.0.1-8","1.0.1-8ubuntu0.1"],"ecosystem_specific":{"binaries":[{"binary_version":"1.0.1-8ubuntu0.1+esm1","binary_name":"grunt"}],"availability":"Available with Ubuntu Pro: https://ubuntu.com/pro"},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-1537.json"}},{"package":{"name":"grunt","ecosystem":"Ubuntu:Pro:20.04:LTS","purl":"pkg:deb/ubuntu/grunt@1.0.4-2ubuntu0.1~esm1?arch=source&distro=esm-apps/focal"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.0.4-2ubuntu0.1~esm1"}]}],"versions":["1.0.1-9","1.0.4-2"],"ecosystem_specific":{"binaries":[{"binary_version":"1.0.4-2ubuntu0.1~esm1","binary_name":"grunt"}],"availability":"Available with Ubuntu Pro: https://ubuntu.com/pro"},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-1537.json"}},{"package":{"name":"grunt","ecosystem":"Ubuntu:Pro:22.04:LTS","purl":"pkg:deb/ubuntu/grunt@1.4.1-2ubuntu0.1~esm1?arch=source&distro=esm-apps/jammy"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.4.1-2ubuntu0.1~esm1"}]}],"versions":["1.3.0-1","1.3.0-2","1.4.1-1","1.4.1-2"],"ecosystem_specific":{"binaries":[{"binary_version":"1.4.1-2ubuntu0.1~esm1","binary_name":"grunt"}],"availability":"Available with Ubuntu Pro: https://ubuntu.com/pro"},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-1537.json"}}],"schema_version":"1.7.3","severity":[{"type":"CVSS_V3","score":"CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"},{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H"},{"type":"Ubuntu","score":"medium"}]}