Vulnerability library
Security checkJanuary 27, 2023

Command Injection in ungit

Understand the exposure, see the recommended fix, and check whether your own website has related weaknesses.

High severitynpmungit

Check your website

Find this and other vulnerabilities with a free scan.

Your scan runs on your computer. No account required.

Description

The package ungit before 1.5.20 are vulnerable to Remote Code Execution (RCE) via argument injection. The issue occurs when calling the /api/fetch endpoint. User controlled values (remote and ref) are passed to the git fetch command. By injecting some git options it was possible to get arbitrary command execution.

Recommendation

Update the ungit package to the latest compatible version. Followings are version details:

  • Affected version(s): < 1.5.20
  • Patched version(s): 1.5.20

References

Could your website be exposed too?

SmartScanner can check your website for Command Injection in ungit and gives you actionable findings to investigate.

Start a free scan

Related Issues

See something that needs correcting? Let us knowUpdated January 27, 2023