Description
git-parse is vulnerable to OS command injection. Untrusted input in `gitDiff` is passed into an `exec` function without validation, allowing an attacker to execute arbitrary OS commands on the host OS.
Affected Software
Related
{"id": "VERACODE:30377", "vendorId": null, "type": "veracode", "bulletinFamily": "software", "title": "OS Command Injection", "description": "git-parse is vulnerable to OS command injection. Untrusted input in `gitDiff` is passed into an `exec` function without validation, allowing an attacker to execute arbitrary OS commands on the host OS.\n", "published": "2021-05-07T05:15:58", "modified": "2022-07-13T12:55:19", "cvss": {"score": 6.8, "vector": "AV:N/AC:M/Au:N/C:P/I:P/A:P"}, "cvss2": {"cvssV2": {"version": "2.0", "vectorString": "AV:N/AC:M/Au:N/C:P/I:P/A:P", "accessVector": "NETWORK", "accessComplexity": "MEDIUM", "authentication": "NONE", "confidentialityImpact": "PARTIAL", "integrityImpact": "PARTIAL", "availabilityImpact": "PARTIAL", "baseScore": 6.8}, "severity": "MEDIUM", "exploitabilityScore": 8.6, "impactScore": 6.4, "acInsufInfo": false, "obtainAllPrivilege": false, "obtainUserPrivilege": false, "obtainOtherPrivilege": false, "userInteractionRequired": true}, "cvss3": {"cvssV3": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "REQUIRED", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH", "baseScore": 8.8, "baseSeverity": "HIGH"}, "exploitabilityScore": 2.8, "impactScore": 5.9}, "href": "https://sca.analysiscenter.veracode.com/vulnerability-database/security/1/1/sid-30377/summary", "reporter": "Veracode Vulnerability Database", "references": ["https://advisory.checkmarx.net/advisory/CX-2020-4302", "https://www.npmjs.com/package/git-parse"], "cvelist": ["CVE-2021-26543"], "immutableFields": [], "lastseen": "2023-04-18T07:03:39", "viewCount": 4, "enchantments": {"score": {"value": 4.4, "vector": "NONE"}, "dependencies": {"references": [{"type": "cve", "idList": ["CVE-2021-26543"]}, {"type": "github", "idList": ["GHSA-M744-2JJ8-VPFV"]}, {"type": "osv", "idList": ["OSV:GHSA-M744-2JJ8-VPFV"]}]}, "affected_software": {"major_version": [{"name": "git-parse", "version": 1}, {"name": "git-parse", "version": 1}, {"name": "git-parse", "version": 1}, {"name": "git-parse", "version": 1}]}, "epss": [{"cve": "CVE-2021-26543", "epss": 0.00218, "percentile": 0.58195, "modified": "2023-04-17"}], "vulnersScore": 4.4}, "_state": {"score": 1684014897, "dependencies": 1681801485, "affected_software_major_version": 0, "epss": 1681802247}, "_internal": {"score_hash": "3a1edf9b902e3870cc27b685f1ec4191"}, "affectedSoftware": [{"version": "1.0.4", "operator": "le", "name": "git-parse"}, {"version": "1.0.4", "operator": "le", "name": "git-parse"}]}
{"osv": [{"lastseen": "2022-07-13T21:53:06", "description": "The \"gitDiff\" function in Wayfair git-parse <=1.0.4 has a command injection vulnerability. Clients of the git-parse library are unlikely to be aware of this, so they might unwittingly write code that contains a vulnerability.", "cvss3": {"exploitabilityScore": 2.8, "cvssV3": {"baseSeverity": "HIGH", "confidentialityImpact": "HIGH", "attackComplexity": "LOW", "scope": "UNCHANGED", "attackVector": "NETWORK", "availabilityImpact": "HIGH", "integrityImpact": "HIGH", "baseScore": 8.8, "privilegesRequired": "NONE", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H", "userInteraction": "REQUIRED", "version": "3.1"}, "impactScore": 5.9}, "published": "2022-02-10T23:51:16", "type": "osv", "title": "Command injection in git-parse", "bulletinFamily": "software", "cvss2": {"severity": "MEDIUM", "exploitabilityScore": 8.6, "obtainAllPrivilege": false, "userInteractionRequired": true, "obtainOtherPrivilege": false, "cvssV2": {"accessComplexity": "MEDIUM", "confidentialityImpact": "PARTIAL", "availabilityImpact": "PARTIAL", "integrityImpact": "PARTIAL", "baseScore": 6.8, "vectorString": "AV:N/AC:M/Au:N/C:P/I:P/A:P", "version": "2.0", "accessVector": "NETWORK", "authentication": "NONE"}, "acInsufInfo": false, "impactScore": 6.4, "obtainUserPrivilege": false}, "cvelist": ["CVE-2021-26543"], "modified": "2022-02-10T23:51:16", "id": "OSV:GHSA-M744-2JJ8-VPFV", "href": "https://osv.dev/vulnerability/GHSA-m744-2jj8-vpfv", "cvss": {"score": 6.8, "vector": "AV:N/AC:M/Au:N/C:P/I:P/A:P"}}], "github": [{"lastseen": "2023-05-27T15:15:26", "description": "The \"gitDiff\" function in Wayfair git-parse <=1.0.4 has a command injection vulnerability. Clients of the git-parse library are unlikely to be aware of this, so they might unwittingly write code that contains a vulnerability.", "cvss3": {"exploitabilityScore": 2.8, "cvssV3": {"baseSeverity": "HIGH", "confidentialityImpact": "HIGH", "attackComplexity": "LOW", "scope": "UNCHANGED", "attackVector": "NETWORK", "availabilityImpact": "HIGH", "integrityImpact": "HIGH", "privilegesRequired": "NONE", "baseScore": 8.8, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H", "version": "3.1", "userInteraction": "REQUIRED"}, "impactScore": 5.9}, "published": "2022-02-10T23:51:16", "type": "github", "title": "Command injection in git-parse", "bulletinFamily": "software", "cvss2": {"severity": "MEDIUM", "exploitabilityScore": 8.6, "obtainAllPrivilege": false, "userInteractionRequired": true, "obtainOtherPrivilege": false, "cvssV2": {"accessComplexity": "MEDIUM", "confidentialityImpact": "PARTIAL", "availabilityImpact": "PARTIAL", "integrityImpact": "PARTIAL", "baseScore": 6.8, "vectorString": "AV:N/AC:M/Au:N/C:P/I:P/A:P", "version": "2.0", "accessVector": "NETWORK", "authentication": "NONE"}, "impactScore": 6.4, "acInsufInfo": false, "obtainUserPrivilege": false}, "cvelist": ["CVE-2021-26543"], "modified": "2023-01-27T05:02:04", "id": "GHSA-M744-2JJ8-VPFV", "href": "https://github.com/advisories/GHSA-m744-2jj8-vpfv", "cvss": {"score": 6.8, "vector": "AV:N/AC:M/Au:N/C:P/I:P/A:P"}}], "cve": [{"lastseen": "2023-05-27T14:31:54", "description": "The \"gitDiff\" function in Wayfair git-parse <=1.0.4 has a command injection vulnerability. Clients of the git-parse library are unlikely to be aware of this, so they might unwittingly write code that contains a vulnerability. The issue has been resolved in version 1.0.5.", "cvss3": {"exploitabilityScore": 2.8, "cvssV3": {"baseSeverity": "HIGH", "confidentialityImpact": "HIGH", "attackComplexity": "LOW", "scope": "UNCHANGED", "attackVector": "NETWORK", "availabilityImpact": "HIGH", "integrityImpact": "HIGH", "privilegesRequired": "NONE", "baseScore": 8.8, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H", "version": "3.1", "userInteraction": "REQUIRED"}, "impactScore": 5.9}, "published": "2021-05-06T13:15:00", "type": "cve", "title": "CVE-2021-26543", "cwe": ["CWE-78"], "bulletinFamily": "NVD", "cvss2": {"severity": "MEDIUM", "exploitabilityScore": 8.6, "obtainAllPrivilege": false, "userInteractionRequired": true, "obtainOtherPrivilege": false, "cvssV2": {"accessComplexity": "MEDIUM", "confidentialityImpact": "PARTIAL", "availabilityImpact": "PARTIAL", "integrityImpact": "PARTIAL", "baseScore": 6.8, "vectorString": "AV:N/AC:M/Au:N/C:P/I:P/A:P", "version": "2.0", "accessVector": "NETWORK", "authentication": "NONE"}, "impactScore": 6.4, "acInsufInfo": false, "obtainUserPrivilege": false}, "cvelist": ["CVE-2021-26543"], "modified": "2022-07-12T17:42:00", "cpe": [], "id": "CVE-2021-26543", "href": "https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2021-26543", "cvss": {"score": 6.8, "vector": "AV:N/AC:M/Au:N/C:P/I:P/A:P"}, "cpe23": []}]}