← Back to CVE Explorer

CVE-2026-58624

Full vulnerability record from the local CVENow database.

Description

Improper input validation in sshd-git in Apache MINA SSHD. Apache MINA SSHD is a Java library for client-side and server-side SSH. Component org.apache.sshd:sshd-git provides though its GitPgmCommandFactory a way to configure an Apache MINA SSHD server such that SSH clients can remotely execute git commands via the JGit library on git repositories stored on the server. This GitPgmCommandFactory allowed a user authenticated via SSH to run any JGit command available, including commands that could write files at arbitrary places such as git archive with the --output option. Affected are SSH servers implemented with Apache MINA SSHD and using the GitPgmCommandFactory. If the GitPgmCommandFactory is not configured on the server, the server is not affected. It is recommended to upgrade affected servers to Apache MINA SSHD 2.19.0 or 3.0.0-M5, which fix this issue. The issue is fixed by restricting the available commands to a small whitelist of uncritical commands (such as git log). git archive is also allowed, but its --output argument is ignored and the archive is always sent through the SSH channel to the client.

Severity
MEDIUM
CVSS score
5.4 (v3.1)
Vulnerability status
Analyzed
Source identifier
Published
2026-07-20 21:16:49.283000
Last modified
2026-10-24 20:10:00.137000
View original CVE JSON
{
  "id": "CVE-2026-58624",
  "sourceIdentifier": "[email protected]",
  "published": "2026-07-20T21:16:49.283",
  "lastModified": "2026-10-24T20:10:00.137",
  "vulnStatus": "Analyzed",
  "cveTags": [],
  "descriptions": [
    {
      "lang": "en",
      "value": "Improper input validation in sshd-git in Apache MINA SSHD. Apache MINA SSHD is a Java library for client-side and server-side SSH.\n\n\n\n\nComponent org.apache.sshd:sshd-git provides though its GitPgmCommandFactory a way to configure an Apache MINA SSHD server such that SSH clients can remotely execute git commands via the JGit library on git repositories stored on the server.\n\n\n\n\nThis GitPgmCommandFactory allowed a user authenticated via SSH to run any JGit command available, including commands that could write files at arbitrary places such as git archive with the --output option.\n\n\n\n\nAffected are SSH servers implemented with Apache MINA SSHD and using the GitPgmCommandFactory. If the GitPgmCommandFactory is not configured on the server, the server is not affected.\n\n\n\n\nIt is recommended to upgrade affected servers to Apache MINA SSHD 2.19.0 or 3.0.0-M5, which fix this issue.\n\n\n\n\nThe issue is fixed by restricting the available commands to a small whitelist of uncritical commands (such as git log). git archive is also allowed, but its --output argument is ignored and the archive is always sent through the SSH channel to the client."
    },
    {
      "lang": "es",
      "value": "Validación de entrada incorrecta en sshd-git en Apache MINA SSHD. Apache MINA SSHD es una biblioteca Java para SSH del lado del cliente y del lado del servidor.\n\nEl componente org.apache.sshd:sshd-git proporciona, a través de su GitPgmCommandFactory, una forma de configurar un servidor Apache MINA SSHD de modo que los clientes SSH puedan ejecutar comandos git de forma remota a través de la biblioteca JGit en repositorios git almacenados en el servidor.\n\nEste GitPgmCommandFactory permitía a un usuario autenticado vía SSH ejecutar cualquier comando JGit disponible, incluyendo comandos que podían escribir archivos en lugares arbitrarios, como git archive con la opción --output.\n\nSe ven afectados los servidores SSH implementados con Apache MINA SSHD y que utilizan el GitPgmCommandFactory. Si el GitPgmCommandFactory no está configurado en el servidor, el servidor no se ve afectado.\n\nSe recomienda actualizar los servidores afectados a Apache MINA SSHD 2.19.0 o 3.0.0-M5, que solucionan este problema.\n\nEl problema se soluciona restringiendo los comandos disponibles a una pequeña lista blanca de comandos no críticos (como git log). git archive también está permitido, pero su argumento --output es ignorado y el archivo siempre se envía a través del canal SSH al cliente."
    }
  ],
  "affected": [
    {
      "source": "[email protected]",
      "affectedData": [
        {
          "vendor": "Apache Software Foundation",
          "product": "Apache MINA SSHD",
          "defaultStatus": "unaffected",
          "collectionURL": "https://repo.maven.apache.org/maven2",
          "packageName": "org.apache.sshd:sshd-git",
          "versions": [
            {
              "version": "2.0.0",
              "lessThanOrEqual": "2.18.0",
              "versionType": "maven",
              "status": "affected"
            },
            {
              "version": "3.0.0-M1",
              "lessThanOrEqual": "3.0.0-M4",
              "versionType": "maven",
              "status": "affected"
            }
          ]
        }
      ]
    }
  ],
  "metrics": {
    "cvssMetricV31": [
      {
        "source": "[email protected]",
        "type": "Secondary",
        "cvssData": {
          "version": "3.1",
          "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L",
          "baseScore": 5.4,
          "baseSeverity": "MEDIUM",
          "attackVector": "NETWORK",
          "attackComplexity": "LOW",
          "privilegesRequired": "LOW",
          "userInteraction": "NONE",
          "scope": "UNCHANGED",
          "confidentialityImpact": "NONE",
          "integrityImpact": "LOW",
          "availabilityImpact": "LOW"
        },
        "exploitabilityScore": 2.8,
        "impactScore": 2.5
      }
    ],
    "ssvcV203": [
      {
        "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
        "ssvcData": {
          "timestamp": "2026-07-21T16:52:17.507328Z",
          "id": "CVE-2026-58624",
          "options": [
            {
              "exploitation": "none"
            },
            {
              "automatable": "no"
            },
            {
              "technicalImpact": "partial"
            }
          ],
          "role": "CISA Coordinator",
          "version": "2.0.3"
        }
      }
    ]
  },
  "weaknesses": [
    {
      "source": "[email protected]",
      "type": "Secondary",
      "description": [
        {
          "lang": "en",
          "value": "CWE-20"
        }
      ]
    }
  ],
  "configurations": [
    {
      "nodes": [
        {
          "operator": "OR",
          "negate": false,
          "cpeMatch": [
            {
              "vulnerable": true,
              "criteria": "cpe:2.3:a:apache:mina_sshd:*:*:*:*:*:*:*:*",
              "versionStartIncluding": "2.0.0",
              "versionEndExcluding": "2.19.0",
              "matchCriteriaId": "93103A71-FB42-4C50-8529-232D40EAD7DD"
            },
            {
              "vulnerable": true,
              "criteria": "cpe:2.3:a:apache:mina_sshd:3.0.0:m1:*:*:*:*:*:*",
              "matchCriteriaId": "32435A6F-3BD6-4AAB-93B1-0B1514419A50"
            },
            {
              "vulnerable": true,
              "criteria": "cpe:2.3:a:apache:mina_sshd:3.0.0:m2:*:*:*:*:*:*",
              "matchCriteriaId": "0E399FD6-9A33-4F78-AFCE-F46C7BBC56F1"
            },
            {
              "vulnerable": true,
              "criteria": "cpe:2.3:a:apache:mina_sshd:3.0.0:m3:*:*:*:*:*:*",
              "matchCriteriaId": "13419EBE-E6B4-4895-BF6C-FC910076CC7A"
            },
            {
              "vulnerable": true,
              "criteria": "cpe:2.3:a:apache:mina_sshd:3.0.0:m4:*:*:*:*:*:*",
              "matchCriteriaId": "1B2D4A4D-BEF5-416F-91AD-B4F278B04C76"
            }
          ]
        }
      ]
    }
  ],
  "references": [
    {
      "url": "https://lists.apache.org/thread/7c3cry6pdy6hj1q0f28rc72x4o4tlyjo",
      "source": "[email protected]",
      "tags": [
        "Vendor Advisory"
      ]
    },
    {
      "url": "http://www.openwall.com/lists/oss-security/2026/07/20/18",
      "source": "af854a3a-2127-422b-91ae-364da2661108",
      "tags": [
        "Mailing List",
        "Third Party Advisory"
      ]
    }
  ]
}