Skip to content
Heist/ feed
Back to feed
HighFix available

libssh2 — security advisory

Type: advisorySources: OSVAdvisory ID: ALPINE-CVE-2026-66032

libssh2 through 1.11.1, fixed in commit 5e47761, contains a double-free vulnerability in the sftp_open() function in src/sftp.c that allows a malicious SSH server to corrupt the heap of any authenticated client opening an SFTP session. When a server responds to SSH_FXP_OPEN with SSH_FXP_STATUS containing FX_OK, the response data buffer is freed, and if a subsequent sftp_packet_require() call returns a specific error such as LIBSSH2_ERROR_CHANNEL_PACKET_EXCEEDED, the same pointer is freed a second time, enabling tcache dup conditions on glibc systems that allow overlapping allocations and function pointer overwrites.

Products
libssh2
Affected versions
Not specified
Fixed versions
1.11.1-r3, 1.11.1-r4
CVEs
CVE-2026-66032
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 13:44 UTC · Revision 1

Source evidence

ALPINE-CVE-2026-66032

core-osv · Original source

Published 24 Jul 2026, 17:17 UTC

libssh2 through 1.11.1, fixed in commit 5e47761, contains a double-free vulnerability in the sftp_open() function in src/sftp.c that allows a malicious SSH server to corrupt the heap of any authenticated client opening an SFTP session. When a server responds to SSH_FXP_OPEN with SSH_FXP_STATUS containing FX_OK, the response data buffer is freed, and if a subsequent sftp_packet_require() call returns a specific error such as LIBSSH2_ERROR_CHANNEL_PACKET_EXCEEDED, the same pointer is freed a second time, enabling tcache dup conditions on glibc systems that allow overlapping allocations and function pointer overwrites.

osv:ALPINE-CVE-2026-66032

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": "7083fb4d20a367db6fe6bca212d401cca3ff044b02e64341221ab9ed0b3704b9",
  "url": "https://osv.dev/vulnerability/ALPINE-CVE-2026-66032",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "ALPINE-CVE-2026-66032",
    "summary": "libssh2 through 1.11.1, fixed in commit 5e47761, contains a double-free vulnerability in the sftp_open() function in src/sftp.c that allows a malicious SSH server to corrupt the heap of any authenticated client opening an SFTP session. When a server responds to SSH_FXP_OPEN with SSH_FXP_STATUS containing FX_OK, the response data buffer is freed, and if a subsequent sftp_packet_require() call returns a specific error such as LIBSSH2_ERROR_CHANNEL_PACKET_EXCEEDED, the same pointer is freed a second time, enabling tcache dup conditions on glibc systems that allow overlapping allocations and function pointer overwrites.",
    "evidence": "osv:ALPINE-CVE-2026-66032",
    "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-66032",
      "aliases": [
        "ALPINE-CVE-2026-66032"
      ],
      "metrics": [
        {
          "type": "CVSS_V4",
          "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/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-66032.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-66032.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-66032.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-66032.json"
          },
          "ecosystem_specific": {}
        }
      ],
      "modified": "2026-10-21T08:30:02.569003840Z",
      "provider": "osv",
      "upstream": [
        "CVE-2026-66032"
      ],
      "references": [
        "https://security.alpinelinux.org/vuln/CVE-2026-66032"
      ]
    },
    "related_cves": [
      {
        "value": "CVE-2026-66032",
        "evidence": "/upstream"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 391831,
  "published_at": "2026-07-24T17:17:35.12+00:00"
}