Skip to content
Heist/ feed
Back to feed
HighFix available

libssh2 — security advisory

Type: advisorySources: OSVAdvisory ID: DEBIAN-CVE-2026-58051

libssh2 through 1.11.1 grows its publickey list with SSH2_REALLOC but does not zero-initialize new entries before parsing populates them, so a parse failure reaching the cleanup path leaves libssh2_publickey_list_free operating on an uninitialized entry. A malicious SSH server offering the publickey subsystem can use a malformed response to make cleanup free an uninitialized, attacker-influenceable attrs pointer in a connecting libssh2 client.

Products
libssh2
Affected versions
1.10.0-3, 1.11.1-1, 1.11.1-1+deb13u1, 1.11.1-2, 1.11.1-3, 1.11.1-4, 1.11.1-5
Fixed versions
1.10.0-3+deb12u1, 1.11.1-1+deb13u2, 1.11.1-6
CVEs
CVE-2026-58051
Confirmed fixed CVEs
Not specified
Updated in this feed
1 Nov 2026, 12:18 UTC · Revision 2

Source evidence

DEBIAN-CVE-2026-58051

core-osv · Original source

Published 28 Jun 2026, 02:16 UTC

libssh2 through 1.11.1 grows its publickey list with SSH2_REALLOC but does not zero-initialize new entries before parsing populates them, so a parse failure reaching the cleanup path leaves libssh2_publickey_list_free operating on an uninitialized entry. A malicious SSH server offering the publickey subsystem can use a malformed response to make cleanup free an uninitialized, attacker-influenceable attrs pointer in a connecting libssh2 client.

osv:DEBIAN-CVE-2026-58051

libssh2

Fixed versions: 1.10.0-3+deb12u1

libssh2

Fixed versions: 1.11.1-1+deb13u2

libssh2

Fixed versions: 1.11.1-6

Complete source record
{
  "id": "3f689c05a62290e37fd74ad58ec1bed07c32031975b908dfa170b8b7bfe94833",
  "url": "https://osv.dev/vulnerability/DEBIAN-CVE-2026-58051",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "DEBIAN-CVE-2026-58051",
    "summary": "libssh2 through 1.11.1 grows its publickey list with SSH2_REALLOC but does not zero-initialize new entries before parsing populates them, so a parse failure reaching the cleanup path leaves libssh2_publickey_list_free operating on an uninitialized entry. A malicious SSH server offering the publickey subsystem can use a malformed response to make cleanup free an uninitialized, attacker-influenceable attrs pointer in a connecting libssh2 client.",
    "evidence": "osv:DEBIAN-CVE-2026-58051",
    "products": [
      {
        "name": {
          "value": "libssh2",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "1.10.0-3+deb12u1",
            "evidence": "/affected/0/ranges"
          }
        ],
        "affected_versions": [
          {
            "value": "1.10.0-3",
            "evidence": "/affected/0/versions"
          }
        ]
      },
      {
        "name": {
          "value": "libssh2",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "1.11.1-1+deb13u2",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": [
          {
            "value": "1.11.1-1",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "1.11.1-1+deb13u1",
            "evidence": "/affected/1/versions"
          }
        ]
      },
      {
        "name": {
          "value": "libssh2",
          "evidence": "/affected/2/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "1.11.1-6",
            "evidence": "/affected/2/ranges"
          }
        ],
        "affected_versions": [
          {
            "value": "1.11.1-1",
            "evidence": "/affected/2/versions"
          },
          {
            "value": "1.11.1-2",
            "evidence": "/affected/2/versions"
          },
          {
            "value": "1.11.1-3",
            "evidence": "/affected/2/versions"
          },
          {
            "value": "1.11.1-4",
            "evidence": "/affected/2/versions"
          },
          {
            "value": "1.11.1-5",
            "evidence": "/affected/2/versions"
          }
        ]
      }
    ],
    "severity": "high",
    "structured": {
      "id": "DEBIAN-CVE-2026-58051",
      "aliases": [
        "DEBIAN-CVE-2026-58051"
      ],
      "metrics": [
        {
          "type": "CVSS_V4",
          "score": "CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:N/VI:L/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "1.10.0-3+deb12u1"
                }
              ]
            }
          ],
          "package": {
            "name": "libssh2",
            "purl": "pkg:deb/debian/libssh2?arch=source&distro=bookworm",
            "ecosystem": "Debian:12"
          },
          "versions": [
            "1.10.0-3"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2026-58051.json"
          },
          "ecosystem_specific": {
            "urgency": "not yet assigned"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "1.11.1-1+deb13u2"
                }
              ]
            }
          ],
          "package": {
            "name": "libssh2",
            "purl": "pkg:deb/debian/libssh2?arch=source&distro=trixie",
            "ecosystem": "Debian:13"
          },
          "versions": [
            "1.11.1-1",
            "1.11.1-1+deb13u1"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2026-58051.json"
          },
          "ecosystem_specific": {
            "urgency": "not yet assigned"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "1.11.1-6"
                }
              ]
            }
          ],
          "package": {
            "name": "libssh2",
            "purl": "pkg:deb/debian/libssh2?arch=source&distro=forky",
            "ecosystem": "Debian:14"
          },
          "versions": [
            "1.11.1-1",
            "1.11.1-2",
            "1.11.1-3",
            "1.11.1-4",
            "1.11.1-5"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2026-58051.json"
          },
          "ecosystem_specific": {
            "urgency": "not yet assigned"
          }
        }
      ],
      "modified": "2026-10-26T11:47:30.296504984Z",
      "provider": "osv",
      "upstream": [
        "CVE-2026-58051"
      ],
      "references": [
        "https://security-tracker.debian.org/tracker/CVE-2026-58051"
      ]
    },
    "related_cves": [
      {
        "value": "CVE-2026-58051",
        "evidence": "/upstream"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 450815,
  "published_at": "2026-06-28T02:16:32.153+00:00"
}