CVE catalog

CVE-2025-5351

libssh vulnerabilities

[CVE catalog]

A flaw was found in the key export functionality of libssh. The issue occurs in the internal function responsible for converting cryptographic keys into serialized formats. During error handling, a memory structure is freed but not cleared, leading to a potential double free issue if an additional failure occurs later in the function. This condition may result in heap corruption or application instability in low-memory scenarios, posing a risk to system reliability where key export operations are performed.

Severity
Medium · CVSS 6.5CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Published
Source
[NVD] · [CVE record]
EPSS
0.61% · Oct 27, 2026

Projects and upstream resources

Reported versions and fixes

Each observation applies to its named package, distribution, and release. Distribution backports can fix a vulnerability while retaining an older upstream version number.

Version impact has not been established. The original provider fields are retained below.

Provider details and historical evidence
Original provider fields
{
  "package_releases": [
    {
      "name": "libssh",
      "status": "fixed",
      "release": "sid",
      "version": "0.12.2-1"
    },
    {
      "name": "libssh",
      "status": "fixed",
      "release": "forky",
      "version": "0.12.2-1"
    },
    {
      "name": "libssh",
      "status": "fixed",
      "release": "trixie",
      "version": "0.11.5-0+deb13u1"
    },
    {
      "name": "libssh",
      "status": "fixed",
      "release": "trixie-security",
      "version": "0.11.5-0+deb13u1"
    },
    {
      "name": "libssh",
      "status": "fixed",
      "release": "bookworm",
      "version": "0.10.6-0+deb12u2"
    },
    {
      "name": "libssh",
      "status": "fixed",
      "release": "bookworm-security",
      "version": "0.10.6-0+deb12u3"
    }
  ],
  "fixed_versions": [
    {
      "bug": 1108407,
      "name": "libssh",
      "type": "source",
      "origin": null,
      "release": "sid",
      "urgency": "not yet assigned",
      "fixed_version": "0.11.2-1"
    },
    {
      "bug": 1108407,
      "name": "libssh",
      "type": "source",
      "origin": null,
      "release": "forky",
      "urgency": "not yet assigned",
      "fixed_version": "0.11.2-1"
    },
    {
      "bug": 1108407,
      "name": "libssh",
      "type": "source",
      "origin": null,
      "release": "trixie",
      "urgency": "not yet assigned",
      "fixed_version": "0.11.2-1"
    },
    {
      "bug": 1108407,
      "name": "libssh",
      "type": "source",
      "origin": null,
      "release": "bookworm",
      "urgency": "not yet assigned",
      "fixed_version": "0.10.6-0+deb12u2"
    }
  ],
  "distribution_packages": [
    {
      "name": "libssh",
      "distro": "ubuntu",
      "release": "noble",
      "ecosystem": "deb",
      "fixed_version": "0.10.6-0+deb12u2"
    },
    {
      "name": "libssh",
      "distro": "ubuntu",
      "release": "noble",
      "ecosystem": "deb",
      "fixed_version": "0.10.6-2ubuntu0.1"
    },
    {
      "name": "libssh-4",
      "distro": "ubuntu",
      "release": "noble",
      "ecosystem": "deb",
      "fixed_version": "0.10.6-2ubuntu0.1"
    },
    {
      "name": "libssh-dev",
      "distro": "ubuntu",
      "release": "noble",
      "ecosystem": "deb",
      "fixed_version": "0.10.6-2ubuntu0.1"
    },
    {
      "name": "libssh-doc",
      "distro": "ubuntu",
      "release": "noble",
      "ecosystem": "deb",
      "fixed_version": "0.10.6-2ubuntu0.1"
    },
    {
      "name": "libssh-gcrypt-4",
      "distro": "ubuntu",
      "release": "noble",
      "ecosystem": "deb",
      "fixed_version": "0.10.6-2ubuntu0.1"
    },
    {
      "name": "libssh-gcrypt-dev",
      "distro": "ubuntu",
      "release": "noble",
      "ecosystem": "deb",
      "fixed_version": "0.10.6-2ubuntu0.1"
    },
    {
      "name": "libssh",
      "ranges": [
        {
          "fixed": "0.11.2",
          "introduced": "0.10.0",
          "last_affected": "",
          "start_excluding": ""
        }
      ],
      "ecosystem": "cpe",
      "fixed_version": "0.11.2",
      "provider_record_id": "NVD-CVE-2025-5351"
    },
    {
      "name": "openshift_container_platform",
      "ranges": [],
      "ecosystem": "cpe",
      "fixed_version": "",
      "provider_record_id": "NVD-CVE-2025-5351"
    },
    {
      "name": "enterprise_linux",
      "ranges": [],
      "ecosystem": "cpe",
      "fixed_version": "",
      "provider_record_id": "NVD-CVE-2025-5351"
    },
    {
      "name": "libssh",
      "distro": "ubuntu",
      "ranges": [
        {
          "type": "ECOSYSTEM",
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "0.10.6-2ubuntu0.1"
            }
          ]
        }
      ],
      "release": "24.04",
      "versions": [
        "0.10.5-3ubuntu1",
        "0.10.5-3ubuntu2",
        "0.10.6-2",
        "0.10.6-2build1",
        "0.10.6-2build2"
      ],
      "ecosystem": "deb",
      "fixed_version": "0.10.6-2ubuntu0.1",
      "provider_record_id": "UBUNTU-CVE-2025-5351"
    }
  ]
}

[Debian bug #1108407]

OpenFactory catalog packages

Matching against OpenFactory catalog package versions is in progress.

[Debian 12 (Bookworm)]

  • [libssh-4]Unknown

    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]Unknown

    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]Unknown

    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

  • 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]Unknown

    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]Unknown

    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]Unknown

    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