Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. ungit
  4. ›
  5. CVE-2022-25766

CVE-2022-25766: Improper Neutralization of Special Elements used in a Command ('Command Injection')

March 21, 2022 (updated August 8, 2023)

The package ungit before 1.5.20 is 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.

References

  • github.com/FredrikNoren/ungit/blob/master/CHANGELOG.md%231520
  • github.com/FredrikNoren/ungit/pull/1510
  • github.com/advisories/GHSA-hf8c-xr89-vfm5
  • nvd.nist.gov/vuln/detail/CVE-2022-25766
  • snyk.io/vuln/SNYK-JS-UNGIT-2414099

Code Behaviors & Features

Detect and mitigate CVE-2022-25766 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 1.5.20

Fixed versions

  • 1.5.20

Solution

Upgrade to version 1.5.20 or above.

Impact 8.8 HIGH

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-88: Improper Neutralization of Argument Delimiters in a Command ('Argument Injection')

Source file

npm/ungit/CVE-2022-25766.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:15:03 +0000.