{"answers":{"affected":"2 open source packages ship an affected version, including grunt. It affects 1 product.","exploited":"There is no known exploitation of CVE-2022-1537 in the wild and no public exploit code.","fix":"Upgrade grunt to 1.5.3 or later.","what":"CVE-2022-1537 is a high-severity vulnerability in gruntjs/grunt, published on 10 May 2022. It can only be exploited from the same machine or local network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2022-1537 and fix it if it is affected.\n\nWhat it is: CVE-2022-1537 is a high-severity vulnerability in gruntjs/grunt, published on 10 May 2022. It can only be exploited from the same machine or local network, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2022-1537 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- grunt (npm): affected all versions; fixed in 1.5.3\n- grunt (npm): affected all versions; fixed in 1.5.3\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2022-1537/ (Markdown: https://insights.sbomify.com/CVE-2022-1537/index.md)","id":"CVE-2022-1537","markdown":"https://insights.sbomify.com/CVE-2022-1537/index.md","name":"CVE-2022-1537","record":{"aliases":["AZL-44082","DEBIAN-CVE-2022-1537","DLA-3383-1","GHSA-rm36-94g8-835r","UBUNTU-CVE-2022-1537"],"analysis":{"component_type":"developer_tool","fix_type":"upgrade","impacts":["privilege_escalation","data_modify"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"GruntJS task runner","requires_auth":"low_privilege","summary":"A TOCTOU race condition in GruntJS file.copy allows local attackers to perform arbitrary file writes, potentially leading to privilege escalation.","user_interaction":"not_required","vuln_class":"race_condition"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"@huntrdev","cpe":[{"product":"grunt","vendor":"gruntjs"}],"cvss":{"score":7.8,"severity":"high","source":"cna","vector":"CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","version":"3.0"},"cwes":[{"id":"CWE-367","name":"Time-of-check Time-of-use (TOCTOU) Race Condition"}],"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.","ecosystems":["npm"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Race Condition in Grunt","id":"CVE-2022-1537","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"race_condition","year":"2022"},"n_packages":2,"n_references":3,"next":{"headline":"Theme-Demo-Importer \u003c 1.1.1 - Admin+ Arbitrary File Upload","id":"CVE-2022-1538"},"packages":[{"ecosystem":"npm","fixed":["1.5.3"],"introduced":["0"],"last_affected":[],"package":"grunt","purl":null,"source":"GHSA-rm36-94g8-835r"},{"ecosystem":"npm","fixed":["1.5.3"],"introduced":["0"],"last_affected":[],"package":"grunt","purl":"pkg:npm/grunt","source":"GHSA-rm36-94g8-835r"}],"prev":{"headline":"automad Dashboard cross site scripting","id":"CVE-2022-1536"},"products":["gruntjs/grunt"],"published":"2022-05-10","related":[{"cvss_score":7.1,"headline":"Path Traversal in gruntjs/grunt","id":"CVE-2022-0436","kev_date_added":null,"published":"2022-04-12"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2024-08-03","vendors":["gruntjs"]},"summary":"A TOCTOU race condition in GruntJS file.copy allows local attackers to perform arbitrary file writes, potentially leading to privilege escalation.","url":"https://insights.sbomify.com/CVE-2022-1537/"}