Skip to content
Heist/ feed
Back to feed
HighFix available

libssh2 — security advisory

Type: advisorySources: OSVAdvisory ID: ALPINE-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
Not specified
Fixed versions
1.11.1-r3, 1.11.1-r4
CVEs
CVE-2026-58051
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 13:44 UTC · Revision 1

Source evidence

ALPINE-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:ALPINE-CVE-2026-58051

libssh2

Fixed versions: 1.11.1-r3

libssh2

Fixed versions: 1.11.1-r3

libssh2

Fixed versions: 1.11.1-r4

libssh2

Fixed versions: 1.11.1-r4

Complete source record
{
  "id": "0741587651c47039a994e125570d9203c549b7b96d2584451a2396f81c7c7361",
  "url": "https://osv.dev/vulnerability/ALPINE-CVE-2026-58051",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "ALPINE-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:ALPINE-CVE-2026-58051",
    "products": [
      {
        "name": {
          "value": "libssh2",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "1.11.1-r3",
            "evidence": "/affected/0/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "libssh2",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "1.11.1-r3",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "libssh2",
          "evidence": "/affected/2/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "1.11.1-r4",
            "evidence": "/affected/2/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "libssh2",
          "evidence": "/affected/3/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "1.11.1-r4",
            "evidence": "/affected/3/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "high",
    "structured": {
      "id": "ALPINE-CVE-2026-58051",
      "aliases": [
        "ALPINE-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.11.1-r3"
                }
              ]
            }
          ],
          "package": {
            "name": "libssh2",
            "purl": "pkg:apk/alpine/libssh2?arch=source",
            "ecosystem": "Alpine:v3.21"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2026-58051.json"
          },
          "ecosystem_specific": {}
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "1.11.1-r3"
                }
              ]
            }
          ],
          "package": {
            "name": "libssh2",
            "purl": "pkg:apk/alpine/libssh2?arch=source",
            "ecosystem": "Alpine:v3.22"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2026-58051.json"
          },
          "ecosystem_specific": {}
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "1.11.1-r4"
                }
              ]
            }
          ],
          "package": {
            "name": "libssh2",
            "purl": "pkg:apk/alpine/libssh2?arch=source",
            "ecosystem": "Alpine:v3.23"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2026-58051.json"
          },
          "ecosystem_specific": {}
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "1.11.1-r4"
                }
              ]
            }
          ],
          "package": {
            "name": "libssh2",
            "purl": "pkg:apk/alpine/libssh2?arch=source",
            "ecosystem": "Alpine:v3.24"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2026-58051.json"
          },
          "ecosystem_specific": {}
        }
      ],
      "modified": "2026-10-21T08:30:02.631941036Z",
      "provider": "osv",
      "upstream": [
        "CVE-2026-58051"
      ],
      "references": [
        "https://security.alpinelinux.org/vuln/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": 391835,
  "published_at": "2026-06-28T02:16:32.153+00:00"
}