libssh vulnerabilities
Ronald Crane discovered that libssh incorrectly handled certain base64 conversions. An attacker could use this issue to cause libssh to crash, resulting in a denial of service, or possibly execute arbitrary code. (CVE-2025-4877) Ronald Crane discovered that libssh incorrectly handled the privatekey_from_file() function. An attacker could use this issue to cause libssh to crash, resulting in a denial of service, or possibly execute arbitrary code. (CVE-2025-4878) Ronald Crane discovered that libssh incorrectly handled certain memory operations in the sftp server. An attacker could possibly use this issue to cause libssh to crash, resulting in a denial of service. (CVE-2025-5318)
- Products
- libssh
- Affected versions
- 0.6.3-3ubuntu3, 0.6.3-4.1, 0.6.3-4.2, 0.6.3-4.2ubuntu1, 0.6.3-4.3, 0.6.3-4.3ubuntu0.1, 0.6.3-4.3ubuntu0.2, 0.6.3-4.3ubuntu0.5, 0.6.3-4.3ubuntu0.6, 0.6.3-4.3ubuntu0.6+esm1, 0.7.5-1, 0.8.0~20170825.94fa1e38-1, 0.8.0~20170825.94fa1e38-1build1, 0.8.0~20170825.94fa1e38-1ubuntu0.1, 0.8.0~20170825.94fa1e38-1ubuntu0.2, 0.8.0~20170825.94fa1e38-1ubuntu0.5, 0.8.0~20170825.94fa1e38-1ubuntu0.6, 0.8.0~20170825.94fa1e38-1ubuntu0.7, 0.8.0~20170825.94fa1e38-1ubuntu0.7+esm3, 0.9.0-1ubuntu1, 0.9.0-1ubuntu4, 0.9.0-1ubuntu5, 0.9.3-2ubuntu1, 0.9.3-2ubuntu2, 0.9.3-2ubuntu2.1, 0.9.3-2ubuntu2.2, 0.9.3-2ubuntu2.3, 0.9.3-2ubuntu2.4, 0.9.3-2ubuntu2.5
- Fixed versions
- 0.6.3-4.3ubuntu0.6+esm2, 0.8.0~20170825.94fa1e38-1ubuntu0.7+esm4, 0.9.3-2ubuntu2.5+esm1
- CVEs
- CVE-2025-4877, CVE-2025-4878, CVE-2025-5318
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 1 Nov 2026, 17:15 UTC · Revision 1
Source evidence
Ronald Crane discovered that libssh incorrectly handled certain base64 conversions. An attacker could use this issue to cause libssh to crash, resulting in a denial of service, or possibly execute arbitrary code. (CVE-2025-4877) Ronald Crane discovered that libssh incorrectly handled the privatekey_from_file() function. An attacker could use this issue to cause libssh to crash, resulting in a denial of service, or possibly execute arbitrary code. (CVE-2025-4878) Ronald Crane discovered that libssh incorrectly handled certain memory operations in the sftp server. An attacker could possibly use this issue to cause libssh to crash, resulting in a denial of service. (CVE-2025-5318)
osv:USN-7696-1
libssh
Fixed versions: 0.6.3-4.3ubuntu0.6+esm2
libssh
Fixed versions: 0.8.0~20170825.94fa1e38-1ubuntu0.7+esm4
libssh
Fixed versions: 0.9.3-2ubuntu2.5+esm1
Complete source record
{
"id": "73c71cd31f4de5edcda87ce28fb9ec88baa6932e8e1ead6950ac87441ea0b57f",
"url": "https://osv.dev/vulnerability/USN-7696-1",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "libssh vulnerabilities",
"summary": "Ronald Crane discovered that libssh incorrectly handled certain base64 conversions. An attacker could use this issue to cause libssh to crash, resulting in a denial of service, or possibly execute arbitrary code. (CVE-2025-4877) Ronald Crane discovered that libssh incorrectly handled the privatekey_from_file() function. An attacker could use this issue to cause libssh to crash, resulting in a denial of service, or possibly execute arbitrary code. (CVE-2025-4878) Ronald Crane discovered that libssh incorrectly handled certain memory operations in the sftp server. An attacker could possibly use this issue to cause libssh to crash, resulting in a denial of service. (CVE-2025-5318)",
"evidence": "osv:USN-7696-1",
"products": [
{
"name": {
"value": "libssh",
"evidence": "/affected/0/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "0.6.3-4.3ubuntu0.6+esm2",
"evidence": "/affected/0/ranges"
}
],
"affected_versions": [
{
"value": "0.6.3-3ubuntu3",
"evidence": "/affected/0/versions"
},
{
"value": "0.6.3-4.1",
"evidence": "/affected/0/versions"
},
{
"value": "0.6.3-4.2",
"evidence": "/affected/0/versions"
},
{
"value": "0.6.3-4.2ubuntu1",
"evidence": "/affected/0/versions"
},
{
"value": "0.6.3-4.3",
"evidence": "/affected/0/versions"
},
{
"value": "0.6.3-4.3ubuntu0.1",
"evidence": "/affected/0/versions"
},
{
"value": "0.6.3-4.3ubuntu0.2",
"evidence": "/affected/0/versions"
},
{
"value": "0.6.3-4.3ubuntu0.5",
"evidence": "/affected/0/versions"
},
{
"value": "0.6.3-4.3ubuntu0.6",
"evidence": "/affected/0/versions"
},
{
"value": "0.6.3-4.3ubuntu0.6+esm1",
"evidence": "/affected/0/versions"
}
]
},
{
"name": {
"value": "libssh",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "0.8.0~20170825.94fa1e38-1ubuntu0.7+esm4",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": [
{
"value": "0.7.5-1",
"evidence": "/affected/1/versions"
},
{
"value": "0.8.0~20170825.94fa1e38-1",
"evidence": "/affected/1/versions"
},
{
"value": "0.8.0~20170825.94fa1e38-1build1",
"evidence": "/affected/1/versions"
},
{
"value": "0.8.0~20170825.94fa1e38-1ubuntu0.1",
"evidence": "/affected/1/versions"
},
{
"value": "0.8.0~20170825.94fa1e38-1ubuntu0.2",
"evidence": "/affected/1/versions"
},
{
"value": "0.8.0~20170825.94fa1e38-1ubuntu0.5",
"evidence": "/affected/1/versions"
},
{
"value": "0.8.0~20170825.94fa1e38-1ubuntu0.6",
"evidence": "/affected/1/versions"
},
{
"value": "0.8.0~20170825.94fa1e38-1ubuntu0.7",
"evidence": "/affected/1/versions"
},
{
"value": "0.8.0~20170825.94fa1e38-1ubuntu0.7+esm3",
"evidence": "/affected/1/versions"
}
]
},
{
"name": {
"value": "libssh",
"evidence": "/affected/2/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "0.9.3-2ubuntu2.5+esm1",
"evidence": "/affected/2/ranges"
}
],
"affected_versions": [
{
"value": "0.9.0-1ubuntu1",
"evidence": "/affected/2/versions"
},
{
"value": "0.9.0-1ubuntu4",
"evidence": "/affected/2/versions"
},
{
"value": "0.9.0-1ubuntu5",
"evidence": "/affected/2/versions"
},
{
"value": "0.9.3-2ubuntu1",
"evidence": "/affected/2/versions"
},
{
"value": "0.9.3-2ubuntu2",
"evidence": "/affected/2/versions"
},
{
"value": "0.9.3-2ubuntu2.1",
"evidence": "/affected/2/versions"
},
{
"value": "0.9.3-2ubuntu2.2",
"evidence": "/affected/2/versions"
},
{
"value": "0.9.3-2ubuntu2.3",
"evidence": "/affected/2/versions"
},
{
"value": "0.9.3-2ubuntu2.4",
"evidence": "/affected/2/versions"
},
{
"value": "0.9.3-2ubuntu2.5",
"evidence": "/affected/2/versions"
}
]
}
],
"severity": "unknown",
"structured": {
"id": "USN-7696-1",
"aliases": [
"USN-7696-1"
],
"affected": [
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "0.6.3-4.3ubuntu0.6+esm2"
}
]
}
],
"package": {
"name": "libssh",
"purl": "pkg:deb/ubuntu/libssh?arch=source&distro=esm-infra%2Fxenial",
"ecosystem": "Ubuntu:Pro:16.04:LTS"
},
"versions": [
"0.6.3-3ubuntu3",
"0.6.3-4.1",
"0.6.3-4.2",
"0.6.3-4.2ubuntu1",
"0.6.3-4.3",
"0.6.3-4.3ubuntu0.1",
"0.6.3-4.3ubuntu0.2",
"0.6.3-4.3ubuntu0.5",
"0.6.3-4.3ubuntu0.6",
"0.6.3-4.3ubuntu0.6+esm1"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/usn/USN-7696-1.json",
"cves_map": {
"cves": [
{
"id": "CVE-2025-4877",
"severity": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L"
},
{
"type": "Ubuntu",
"score": "medium"
}
]
},
{
"id": "CVE-2025-4878",
"severity": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N"
},
{
"type": "Ubuntu",
"score": "medium"
}
]
},
{
"id": "CVE-2025-5318",
"severity": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N"
},
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H"
},
{
"type": "Ubuntu",
"score": "medium"
}
]
}
],
"ecosystem": "Ubuntu:Pro:16.04:LTS"
}
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "libssh-4",
"binary_version": "0.6.3-4.3ubuntu0.6+esm2"
},
{
"binary_name": "libssh-gcrypt-4",
"binary_version": "0.6.3-4.3ubuntu0.6+esm2"
}
],
"availability": "Available with Ubuntu Pro (Infra-only): https://ubuntu.com/pro"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "0.8.0~20170825.94fa1e38-1ubuntu0.7+esm4"
}
]
}
],
"package": {
"name": "libssh",
"purl": "pkg:deb/ubuntu/libssh?arch=source&distro=esm-infra%2Fbionic",
"ecosystem": "Ubuntu:Pro:18.04:LTS"
},
"versions": [
"0.7.5-1",
"0.8.0~20170825.94fa1e38-1",
"0.8.0~20170825.94fa1e38-1build1",
"0.8.0~20170825.94fa1e38-1ubuntu0.1",
"0.8.0~20170825.94fa1e38-1ubuntu0.2",
"0.8.0~20170825.94fa1e38-1ubuntu0.5",
"0.8.0~20170825.94fa1e38-1ubuntu0.6",
"0.8.0~20170825.94fa1e38-1ubuntu0.7",
"0.8.0~20170825.94fa1e38-1ubuntu0.7+esm3"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/usn/USN-7696-1.json",
"cves_map": {
"cves": [
{
"id": "CVE-2025-4877",
"severity": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L"
},
{
"type": "Ubuntu",
"score": "medium"
}
]
},
{
"id": "CVE-2025-4878",
"severity": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N"
},
{
"type": "Ubuntu",
"score": "medium"
}
]
},
{
"id": "CVE-2025-5318",
"severity": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N"
},
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H"
},
{
"type": "Ubuntu",
"score": "medium"
}
]
}
],
"ecosystem": "Ubuntu:Pro:18.04:LTS"
}
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "libssh-4",
"binary_version": "0.8.0~20170825.94fa1e38-1ubuntu0.7+esm4"
},
{
"binary_name": "libssh-gcrypt-4",
"binary_version": "0.8.0~20170825.94fa1e38-1ubuntu0.7+esm4"
}
],
"availability": "Available with Ubuntu Pro (Infra-only): https://ubuntu.com/pro"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "0.9.3-2ubuntu2.5+esm1"
}
]
}
],
"package": {
"name": "libssh",
"purl": "pkg:deb/ubuntu/libssh?arch=source&distro=esm-infra%2Ffocal",
"ecosystem": "Ubuntu:Pro:20.04:LTS"
},
"versions": [
"0.9.0-1ubuntu1",
"0.9.0-1ubuntu4",
"0.9.0-1ubuntu5",
"0.9.3-2ubuntu1",
"0.9.3-2ubuntu2",
"0.9.3-2ubuntu2.1",
"0.9.3-2ubuntu2.2",
"0.9.3-2ubuntu2.3",
"0.9.3-2ubuntu2.4",
"0.9.3-2ubuntu2.5"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/usn/USN-7696-1.json",
"cves_map": {
"cves": [
{
"id": "CVE-2025-4877",
"severity": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L"
},
{
"type": "Ubuntu",
"score": "medium"
}
]
},
{
"id": "CVE-2025-4878",
"severity": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:N"
},
{
"type": "Ubuntu",
"score": "medium"
}
]
},
{
"id": "CVE-2025-5318",
"severity": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N"
},
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H"
},
{
"type": "Ubuntu",
"score": "medium"
}
]
}
],
"ecosystem": "Ubuntu:Pro:20.04:LTS"
}
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "libssh-4",
"binary_version": "0.9.3-2ubuntu2.5+esm1"
},
{
"binary_name": "libssh-gcrypt-4",
"binary_version": "0.9.3-2ubuntu2.5+esm1"
}
],
"availability": "Available with Ubuntu Pro (Infra-only): https://ubuntu.com/pro"
}
}
],
"modified": "2026-10-27T04:16:31.131352896Z",
"provider": "osv",
"upstream": [
"CVE-2025-4877",
"CVE-2025-4878",
"CVE-2025-5318",
"UBUNTU-CVE-2025-4877",
"UBUNTU-CVE-2025-4878",
"UBUNTU-CVE-2025-5318"
],
"references": [
"https://ubuntu.com/security/notices/USN-7696-1",
"https://ubuntu.com/security/CVE-2025-4877",
"https://ubuntu.com/security/CVE-2025-4878",
"https://ubuntu.com/security/CVE-2025-5318"
]
},
"related_cves": [
{
"value": "CVE-2025-4877",
"evidence": "/upstream"
},
{
"value": "CVE-2025-4878",
"evidence": "/upstream"
},
{
"value": "CVE-2025-5318",
"evidence": "/upstream"
}
],
"security_relevant": true,
"severity_evidence": null
},
"source_id": "core-osv",
"document_id": 460189,
"published_at": "2025-08-14T06:35:13+00:00"
}