Skip to content
Heist/ feed
Back to feed
HighFix available

libssh — security advisory

Type: advisorySources: OSVAdvisory ID: DEBIAN-CVE-2025-5987

A flaw was found in libssh when using the ChaCha20 cipher with the OpenSSL library. If an attacker manages to exhaust the heap space, this error is not detected and may lead to libssh using a partially initialized cipher context. This occurs because the OpenSSL error code returned aliases with the SSH_OK code, resulting in libssh not properly detecting the error returned by the OpenSSL library. This issue can lead to undefined behavior, including compromised data confidentiality and integrity or crashes.

Products
libssh
Affected versions
0.10.5-2, 0.10.5-3, 0.10.5-3+hurd.1, 0.10.6-0+deb12u1
Fixed versions
0.10.6-0+deb12u2, 0.11.2-1
CVEs
CVE-2025-5987
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 23:08 UTC · Revision 1

Source evidence

DEBIAN-CVE-2025-5987

core-osv · Original source

Published 7 Jul 2025, 15:15 UTC

A flaw was found in libssh when using the ChaCha20 cipher with the OpenSSL library. If an attacker manages to exhaust the heap space, this error is not detected and may lead to libssh using a partially initialized cipher context. This occurs because the OpenSSL error code returned aliases with the SSH_OK code, resulting in libssh not properly detecting the error returned by the OpenSSL library. This issue can lead to undefined behavior, including compromised data confidentiality and integrity or crashes.

osv:DEBIAN-CVE-2025-5987

libssh

Fixed versions: 0.10.6-0+deb12u2

libssh

Fixed versions: 0.11.2-1

libssh

Fixed versions: 0.11.2-1

Complete source record
{
  "id": "dd7216d530b09ef894ed7870f18d198c8febc09e1879f52dbd40fb23212a505f",
  "url": "https://osv.dev/vulnerability/DEBIAN-CVE-2025-5987",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "DEBIAN-CVE-2025-5987",
    "summary": "A flaw was found in libssh when using the ChaCha20 cipher with the OpenSSL library. If an attacker manages to exhaust the heap space, this error is not detected and may lead to libssh using a partially initialized cipher context. This occurs because the OpenSSL error code returned aliases with the SSH_OK code, resulting in libssh not properly detecting the error returned by the OpenSSL library. This issue can lead to undefined behavior, including compromised data confidentiality and integrity or crashes.",
    "evidence": "osv:DEBIAN-CVE-2025-5987",
    "products": [
      {
        "name": {
          "value": "libssh",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "0.10.6-0+deb12u2",
            "evidence": "/affected/0/ranges"
          }
        ],
        "affected_versions": [
          {
            "value": "0.10.5-2",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "0.10.5-3",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "0.10.5-3+hurd.1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "0.10.6-0+deb12u1",
            "evidence": "/affected/0/versions"
          }
        ]
      },
      {
        "name": {
          "value": "libssh",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "0.11.2-1",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "libssh",
          "evidence": "/affected/2/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "0.11.2-1",
            "evidence": "/affected/2/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "high",
    "structured": {
      "id": "DEBIAN-CVE-2025-5987",
      "aliases": [
        "DEBIAN-CVE-2025-5987"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "0.10.6-0+deb12u2"
                }
              ]
            }
          ],
          "package": {
            "name": "libssh",
            "purl": "pkg:deb/debian/libssh?arch=source&distro=bookworm",
            "ecosystem": "Debian:12"
          },
          "versions": [
            "0.10.5-2",
            "0.10.5-3",
            "0.10.5-3+hurd.1",
            "0.10.6-0+deb12u1"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2025-5987.json"
          },
          "ecosystem_specific": {
            "urgency": "not yet assigned"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "0.11.2-1"
                }
              ]
            }
          ],
          "package": {
            "name": "libssh",
            "purl": "pkg:deb/debian/libssh?arch=source&distro=trixie",
            "ecosystem": "Debian:13"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2025-5987.json"
          },
          "ecosystem_specific": {
            "urgency": "not yet assigned"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "0.11.2-1"
                }
              ]
            }
          ],
          "package": {
            "name": "libssh",
            "purl": "pkg:deb/debian/libssh?arch=source&distro=forky",
            "ecosystem": "Debian:14"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2025-5987.json"
          },
          "ecosystem_specific": {
            "urgency": "not yet assigned"
          }
        }
      ],
      "modified": "2026-10-23T17:47:35.758399980Z",
      "provider": "osv",
      "upstream": [
        "CVE-2025-5987"
      ],
      "references": [
        "https://security-tracker.debian.org/tracker/CVE-2025-5987"
      ]
    },
    "related_cves": [
      {
        "value": "CVE-2025-5987",
        "evidence": "/upstream"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 417838,
  "published_at": "2025-07-07T15:15:28.18+00:00"
}