Skip to content
Heist/ feed
Back to feed
High

libssh2 - Integer Overflow in publickey Subsystem Attribute Allocation

Type: advisorySources: OSV

libssh2 through 1.11.1 reads an attacker-controlled 32-bit attribute count from a publickey-subsystem response and uses it in the allocation num_attrs * sizeof(libssh2_publickey_attribute) without bounds checking, so on 32-bit platforms the multiplication overflows to an undersized buffer. A malicious SSH server can then drive the attribute-parsing loop to write past the allocation, causing a heap buffer overflow in a connecting libssh2 client.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-58050
Confirmed fixed CVEs
Not specified
Updated in this feed
3 Nov 2026, 17:24 UTC · Revision 1

Source evidence

libssh2 - Integer Overflow in publickey Subsystem Attribute Allocation

core-osv · Original source

Published 28 Jun 2026, 01:32 UTC

libssh2 through 1.11.1 reads an attacker-controlled 32-bit attribute count from a publickey-subsystem response and uses it in the allocation num_attrs * sizeof(libssh2_publickey_attribute) without bounds checking, so on 32-bit platforms the multiplication overflows to an undersized buffer. A malicious SSH server can then drive the attribute-parsing loop to write past the allocation, causing a heap buffer overflow in a connecting libssh2 client.

osv:CVE-2026-58050
Complete source record
{
  "id": "d6b9508356c6024f95deb3d44eedc3b69f67c3f62226e03fc8eb24f338573c74",
  "url": "https://osv.dev/vulnerability/CVE-2026-58050",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "libssh2 - Integer Overflow in publickey Subsystem Attribute Allocation",
    "summary": "libssh2 through 1.11.1 reads an attacker-controlled 32-bit attribute count from a publickey-subsystem response and uses it in the allocation num_attrs * sizeof(libssh2_publickey_attribute) without bounds checking, so on 32-bit platforms the multiplication overflows to an undersized buffer. A malicious SSH server can then drive the attribute-parsing loop to write past the allocation, causing a heap buffer overflow in a connecting libssh2 client.",
    "evidence": "osv:CVE-2026-58050",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2026-58050",
      "aliases": [
        "CVE-2026-58050"
      ],
      "metrics": [
        {
          "type": "CVSS_V4",
          "score": "CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:L/VI:L/VA:H/SC:N/SI:N/SA:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/libssh2/libssh2",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "last_affected": "a312b43325e3383c865a87bb1d26cb52e3292641"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "last_affected": "1.11.1"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StandardRange"
                  },
                  {
                    "cpe": "cpe:2.3:a:libssh2:libssh2:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "last_affected": "1.11.1"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "libssh2-1.11.1",
            "libssh2-1.11.0",
            "libssh2-1.10.0",
            "libssh2-1.9.0",
            "libssh2-1.8.0",
            "libssh2-1.7.0",
            "libssh2-1.6.0",
            "libssh2-1.5.0",
            "libssh2-1.4.3",
            "libssh2-1.4.2",
            "libssh2-1.4.1",
            "libssh2-1.4.0",
            "libssh2-1.3.0",
            "libssh2-1.2.9",
            "libssh2-1.2.8",
            "libssh2-1.2.7",
            "libssh2-1.2.6",
            "libssh2-1.2.5",
            "libssh2-1.2.4",
            "libssh2-1.2.3",
            "libssh2-1.2.1",
            "libssh2-1.2",
            "RELEASE.1.1",
            "RELEASE.1.0",
            "RELEASE.0.18",
            "RELEASE.0.17",
            "RELEASE.0.16",
            "RELEASE.0.15",
            "beforenb2-0.14",
            "beforenb-0.14",
            "RELEASE.0.14",
            "RELEASE.0.13",
            "RELEASE.0.12",
            "RELEASE.0.11",
            "RELEASE.0.10",
            "RELEASE.0.8",
            "RELEASE.0.7",
            "RELEASE.0.6",
            "RELEASE.0.5",
            "RELEASE.0.3",
            "RELEASE.0.1"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-58050.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:30.683811822Z",
      "provider": "osv",
      "references": [
        "https://github.com/libssh2/libssh2/blob/master/src/publickey.c",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/58xxx/CVE-2026-58050.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-58050",
        "https://www.vulncheck.com/advisories/libssh2-integer-overflow-in-publickey-subsystem-attribute-allocation",
        "https://github.com/bikini/exploitarium/tree/main/libssh2-publickey-list-calc-poc"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-190"
        ],
        "cna_assigner": "VulnCheck",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/58xxx/CVE-2026-58050.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-58050",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 497797,
  "published_at": "2026-06-28T01:32:53.582+00:00"
}