CVE catalog

CVE-2025-5987

libssh vulnerabilities

[CVE catalog]

Severity
High · CVSS 8.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Published
Source
[NVD] · [CVE record]
EPSS
1.73% · Oct 25, 2026

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.

Vulnerable and fixed packages

Distribution-reported package versions and fixes. These do not depend on matching against the OpenFactory package catalog.

DistributionPackageReleaseVersionStatus
Debianlibsshsid0.12.2-1fixed
Debianlibsshforky0.12.2-1fixed
Debianlibsshtrixie0.11.5-0+deb13u1fixed
Debianlibsshtrixie-security0.11.5-0+deb13u1fixed
Debianlibsshbookworm0.10.6-0+deb12u2fixed
Debianlibsshbookworm-security0.10.6-0+deb12u3fixed
Ubuntulibsshnoble0.10.6-0+deb12u2fixed
Ubuntulibsshnoble0.10.6-2ubuntu0.1fixed
Ubuntulibssh-4noble0.10.6-2ubuntu0.1fixed
Ubuntulibssh-devnoble0.10.6-2ubuntu0.1fixed
Ubuntulibssh-docnoble0.10.6-2ubuntu0.1fixed
Ubuntulibssh-gcrypt-4noble0.10.6-2ubuntu0.1fixed
Ubuntulibssh-gcrypt-devnoble0.10.6-2ubuntu0.1fixed
CpelibsshNot reported0.11.2fixed
Ubuntulibssh24.040.10.5-3ubuntu1vulnerable
Ubuntulibssh24.040.10.5-3ubuntu2vulnerable
Ubuntulibssh24.040.10.6-2vulnerable
Ubuntulibssh24.040.10.6-2build1vulnerable
Ubuntulibssh24.040.10.6-2build2vulnerable
Ubuntulibssh24.040.10.6-2ubuntu0.1fixed

Fixed-version evidence

DistributionPackageTypeReleaseFixed versionUrgencyOriginBugs
Debianlibsshsourcesid0.11.2-1not yet assignedNot reported[1108407]
Debianlibsshsourceforky0.11.2-1not yet assignedNot reported[1108407]
Debianlibsshsourcetrixie0.11.2-1not yet assignedNot reported[1108407]
Debianlibsshsourcebookworm0.10.6-0+deb12u2not yet assignedNot reported[1108407]
Ubuntulibsshdebnoble0.10.6-0+deb12u2Not reportedNot reportedNot reported
Ubuntulibsshdebnoble0.10.6-2ubuntu0.1Not reportedNot reportedNot reported
Ubuntulibssh-4debnoble0.10.6-2ubuntu0.1Not reportedNot reportedNot reported
Ubuntulibssh-devdebnoble0.10.6-2ubuntu0.1Not reportedNot reportedNot reported
Ubuntulibssh-docdebnoble0.10.6-2ubuntu0.1Not reportedNot reportedNot reported
Ubuntulibssh-gcrypt-4debnoble0.10.6-2ubuntu0.1Not reportedNot reportedNot reported
Ubuntulibssh-gcrypt-devdebnoble0.10.6-2ubuntu0.1Not reportedNot reportedNot reported
CpelibsshcpeNot reported0.11.2Not reportedNVD-CVE-2025-5987Not reported
Ubuntulibsshdeb24.040.10.6-2ubuntu0.1Not reportedUBUNTU-CVE-2025-5987Not reported

[Debian bug #1108407]

OpenFactory catalog packages

[Debian 12 (Bookworm)]

  • [libssh-4]Affected

    Source package: [libssh]

    Details (4)
    • 0.10.6-0+deb12u2 · amd64 · bookworm

      Fixed · Fixed: 0.10.6-0+deb12u2

      usn · libssh · debian · bookworm; usn · libssh · debian · 12

    • 0.10.6-0+deb12u2 · arm64 · bookworm

      Fixed · Fixed: 0.10.6-0+deb12u2

      usn · libssh · debian · bookworm; usn · libssh · debian · 12

    • 0.10.6-0+deb12u1 · amd64 · bookworm-security

      Affected · Fixed: 0.10.6-0+deb12u2

      usn · libssh · debian · bookworm; usn · libssh · debian · 12

    • 0.10.6-0+deb12u1 · arm64 · bookworm-security

      Affected · Fixed: 0.10.6-0+deb12u2

      usn · libssh · debian · bookworm; usn · libssh · debian · 12

  • [libssh-dev]Affected

    Source package: [libssh]

    Details (4)
    • 0.10.6-0+deb12u2 · amd64 · bookworm

      Fixed · Fixed: 0.10.6-0+deb12u2

      usn · libssh · debian · bookworm; usn · libssh · debian · 12

    • 0.10.6-0+deb12u2 · arm64 · bookworm

      Fixed · Fixed: 0.10.6-0+deb12u2

      usn · libssh · debian · bookworm; usn · libssh · debian · 12

    • 0.10.6-0+deb12u1 · amd64 · bookworm-security

      Affected · Fixed: 0.10.6-0+deb12u2

      usn · libssh · debian · bookworm; usn · libssh · debian · 12

    • 0.10.6-0+deb12u1 · arm64 · bookworm-security

      Affected · Fixed: 0.10.6-0+deb12u2

      usn · libssh · debian · bookworm; usn · libssh · debian · 12

  • [libssh-doc]Affected

    Source package: [libssh]

    Details (4)
    • 0.10.6-0+deb12u2 · all · bookworm

      Fixed · Fixed: 0.10.6-0+deb12u2

      usn · libssh · debian · bookworm; usn · libssh · debian · 12

    • 0.10.6-0+deb12u2 · all · bookworm

      Fixed · Fixed: 0.10.6-0+deb12u2

      usn · libssh · debian · bookworm; usn · libssh · debian · 12

    • 0.10.6-0+deb12u1 · all · bookworm-security

      Affected · Fixed: 0.10.6-0+deb12u2

      usn · libssh · debian · bookworm; usn · libssh · debian · 12

    • 0.10.6-0+deb12u1 · all · bookworm-security

      Affected · Fixed: 0.10.6-0+deb12u2

      usn · libssh · debian · bookworm; usn · libssh · debian · 12

  • [libssh-gcrypt-4]Affected

    Source package: [libssh]

    Details (4)
    • 0.10.6-0+deb12u2 · amd64 · bookworm

      Fixed · Fixed: 0.10.6-0+deb12u2

      usn · libssh · debian · bookworm; usn · libssh · debian · 12

    • 0.10.6-0+deb12u2 · arm64 · bookworm

      Fixed · Fixed: 0.10.6-0+deb12u2

      usn · libssh · debian · bookworm; usn · libssh · debian · 12

    • 0.10.6-0+deb12u1 · amd64 · bookworm-security

      Affected · Fixed: 0.10.6-0+deb12u2

      usn · libssh · debian · bookworm; usn · libssh · debian · 12

    • 0.10.6-0+deb12u1 · arm64 · bookworm-security

      Affected · Fixed: 0.10.6-0+deb12u2

      usn · libssh · debian · bookworm; usn · libssh · debian · 12

  • Source package: [libssh]

    Details (4)
    • 0.10.6-0+deb12u2 · amd64 · bookworm

      Fixed · Fixed: 0.10.6-0+deb12u2

      usn · libssh · debian · bookworm; usn · libssh · debian · 12

    • 0.10.6-0+deb12u2 · arm64 · bookworm

      Fixed · Fixed: 0.10.6-0+deb12u2

      usn · libssh · debian · bookworm; usn · libssh · debian · 12

    • 0.10.6-0+deb12u1 · amd64 · bookworm-security

      Affected · Fixed: 0.10.6-0+deb12u2

      usn · libssh · debian · bookworm; usn · libssh · debian · 12

    • 0.10.6-0+deb12u1 · arm64 · bookworm-security

      Affected · Fixed: 0.10.6-0+deb12u2

      usn · libssh · debian · bookworm; usn · libssh · debian · 12

[Debian 13 (Trixie)]

  • [libssh-4]Fixed

    Source package: [libssh]

    Details (4)
    • 0.11.2-1+deb13u1 · amd64 · trixie

      Fixed · Fixed: 0.11.2-1

      usn · libssh · debian · 13

    • 0.11.2-1+deb13u1 · arm64 · trixie

      Fixed · Fixed: 0.11.2-1

      usn · libssh · debian · 13

    • 0.11.5-0+deb13u1 · amd64 · trixie-security

      Fixed · Fixed: 0.11.2-1

      usn · libssh · debian · 13

    • 0.11.5-0+deb13u1 · arm64 · trixie-security

      Fixed · Fixed: 0.11.2-1

      usn · libssh · debian · 13

  • [libssh-dev]Fixed

    Source package: [libssh]

    Details (4)
    • 0.11.2-1+deb13u1 · amd64 · trixie

      Fixed · Fixed: 0.11.2-1

      usn · libssh · debian · 13

    • 0.11.2-1+deb13u1 · arm64 · trixie

      Fixed · Fixed: 0.11.2-1

      usn · libssh · debian · 13

    • 0.11.5-0+deb13u1 · amd64 · trixie-security

      Fixed · Fixed: 0.11.2-1

      usn · libssh · debian · 13

    • 0.11.5-0+deb13u1 · arm64 · trixie-security

      Fixed · Fixed: 0.11.2-1

      usn · libssh · debian · 13

  • [libssh-doc]Fixed

    Source package: [libssh]

    Details (4)
    • 0.11.2-1+deb13u1 · all · trixie

      Fixed · Fixed: 0.11.2-1

      usn · libssh · debian · 13

    • 0.11.2-1+deb13u1 · all · trixie

      Fixed · Fixed: 0.11.2-1

      usn · libssh · debian · 13

    • 0.11.5-0+deb13u1 · all · trixie-security

      Fixed · Fixed: 0.11.2-1

      usn · libssh · debian · 13

    • 0.11.5-0+deb13u1 · all · trixie-security

      Fixed · Fixed: 0.11.2-1

      usn · libssh · debian · 13

Observed:

References