Skip to content
Heist/ feed
Back to feed
High

Remote Code Execution (RCE)

Type: advisorySources: OSV

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2022-25766
Confirmed fixed CVEs
Not specified
Updated in this feed
4 Nov 2026, 16:34 UTC · Revision 1

Source evidence

Remote Code Execution (RCE)

core-osv · Original source

Published 21 Mar 2022, 17:15 UTC

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.

osv:CVE-2022-25766
Complete source record
{
  "id": "7785304a3e81fb8086910ead920a2d593cf188680d5298c991652c51630e7eb7",
  "url": "https://osv.dev/vulnerability/CVE-2022-25766",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Remote Code Execution (RCE)",
    "summary": "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.",
    "evidence": "osv:CVE-2022-25766",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2022-25766",
      "aliases": [
        "CVE-2022-25766",
        "GHSA-hf8c-xr89-vfm5",
        "SNYK-JS-UNGIT-2414099"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/fredriknoren/ungit",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "9ced7530814aac488dc659bfe7be171b9d422028"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "1.5.20"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "SplitRange"
                  },
                  {
                    "cpe": "cpe:2.3:a:ungit_project:ungit:*:*:*:*:*:node.js:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "1.5.20"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v1.5.19",
            "v1.5.18",
            "v1.5.17",
            "v1.5.16",
            "v1.5.15",
            "v1.5.14",
            "v1.5.13",
            "v1.5.12",
            "v1.5.11",
            "v1.5.10",
            "v1.5.9",
            "v1.5.8",
            "v1.5.7",
            "v1.5.6",
            "v1.5.5",
            "v1.5.4",
            "v1.5.3",
            "v1.5.2",
            "v1.5.1",
            "v1.5.0",
            "v1.4.48",
            "v1.4.47",
            "v1.4.46",
            "v1.4.45",
            "v1.4.44",
            "v1.4.43",
            "v1.4.42",
            "v1.4.41",
            "v1.4.40",
            "v1.4.36",
            "v1.4.35",
            "v1.4.34",
            "v1.4.32",
            "v1.4.31",
            "v1.4.30",
            "v1.4.29",
            "v1.4.28",
            "v1.4.27",
            "v1.4.26",
            "v1.4.25",
            "v1.4.24",
            "v1.4.22",
            "v1.4.21",
            "v1.4.20",
            "v1.4.19",
            "v1.4.18",
            "v1.4.17",
            "v1.4.16",
            "v1.4.15",
            "v1.4.14",
            "v1.4.13",
            "v1.4.12",
            "v1.4.10",
            "v1.4.9",
            "v1.4.8",
            "v1.4.7",
            "v1.4.6",
            "v1.4.5",
            "v1.4.3",
            "v1.4.2",
            "v1.4.1",
            "v1.4.0",
            "v1.3.3",
            "v1.3.2",
            "v1.3.1",
            "v1.3.0",
            "v1.2.3",
            "v1.2.2",
            "v1.2.1",
            "v1.2.0",
            "v1.1.33",
            "v1.1.32",
            "v1.1.30",
            "v1.1.29",
            "v1.1.28",
            "v1.1.27",
            "v1.1.26",
            "v1.1.25",
            "v1.1.24",
            "v1.1.23",
            "v1.1.22",
            "v1.1.21",
            "v1.1.20",
            "v1.1.19",
            "v1.1.18",
            "v1.1.17",
            "v1.1.16",
            "v1.1.15",
            "v1.1.14",
            "v1.1.13",
            "v1.1.12",
            "v1.1.11",
            "v1.1.10",
            "v1.1.9",
            "v1.1.8",
            "v1.1.7",
            "v1.1.6",
            "v1.1.5",
            "v1.1.3",
            "v1.1.2",
            "v1.1.1",
            "v1.1.0",
            "v1.0.1",
            "v1.0.0",
            "v0.10.3",
            "v0.10.2",
            "v0.10.1",
            "v0.10.0",
            "v0.9.3",
            "v0.9.2",
            "v0.9.1",
            "v0.9.0",
            "0.8.4",
            "0.8.3",
            "0.8.2",
            "0.8.1",
            "0.8.0",
            "0.7.2",
            "0.7.0",
            "0.7.1",
            "0.6.2",
            "0.6.1",
            "0.6.0",
            "0.5.0",
            "0.4.0",
            "0.3.2",
            "0.3.1",
            "0.3.0",
            "0.2.1",
            "0.2.0",
            "0.1.9",
            "0.1.8",
            "0.1.7",
            "0.1.6",
            "0.1.5",
            "0.1.4",
            "0.1.3",
            "0.1.2",
            "0.1.1",
            "0.1.0",
            "v0.0.1"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-25766.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:37.399971957Z",
      "provider": "osv",
      "references": [
        "https://github.com/FredrikNoren/ungit/blob/master/CHANGELOG.md%231520",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/25xxx/CVE-2022-25766.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2022-25766",
        "https://snyk.io/vuln/SNYK-JS-UNGIT-2414099",
        "https://github.com/FredrikNoren/ungit/pull/1510"
      ],
      "provider_metadata": {
        "cna_assigner": "snyk",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/25xxx/CVE-2022-25766.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2022-25766",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 504689,
  "published_at": "2022-03-21T17:15:16.57+00:00"
}