---
id: CVE-2023-6918
title: 'Libssh: missing checks for return values for digests'
summary: >-
  A flaw was found in the libssh implements abstract layer for message digest
  (MD) operations implemented by different supported crypto backends. The return
  values from these were not properly checked, which could cause low-memory
  situatio…
severity: low
cvss: 3.7
cvssVector: 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L'
cvssSource: cna
cwe:
  - CWE-252
vendor: Red Hat
product: libssh
affected:
  - libssh (all versions)
  - libssh (all versions)
  - libssh (all versions)
  - libssh (all versions)
  - libssh2
  - libssh
  - libssh2
published: '2023-12-18'
updated: '2026-11-06'
sourceUpdated: '2026-11-06T13:40:36.423Z'
source: CVEORG
sourceUrl: 'https://www.cve.org/CVERecord?id=CVE-2023-6918'
references:
  - url: 'https://access.redhat.com/errata/RHSA-2024:2504'
    label: 'RHSA-2024:2504'
  - url: 'https://access.redhat.com/errata/RHSA-2024:3233'
    label: 'RHSA-2024:3233'
  - url: 'https://access.redhat.com/security/cve/CVE-2023-6918'
  - url: 'https://bugzilla.redhat.com/show_bug.cgi?id=2254997'
    label: RHBZ#2254997
  - url: >-
      https://www.libssh.org/2023/12/18/libssh-0-10-6-and-libssh-0-9-8-security-releases/
  - url: 'https://www.libssh.org/security/advisories/CVE-2023-6918.txt'
tags:
  - cve.org
epss: 0.01409
epssPercentile: 0.72799
ingestedAt: '2026-11-06T13:52:17.101Z'
---

## Overview

A flaw was found in the libssh implements abstract layer for message digest (MD) operations implemented by different supported crypto backends. The return values from these were not properly checked, which could cause low-memory situations failures, NULL dereferences, crashes, or usage of the uninitialized memory as an input for the KDF. In this case, non-matching keys will result in decryption/integrity failures, terminating the connection.

## Affected

- `libssh (all versions)`
- `libssh (all versions)`
- `libssh (all versions)`
- `libssh (all versions)`
- `libssh2`
- `libssh`
- `libssh2`

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.

### Workarounds

Mitigation for this issue is either not available or the currently available options don't meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.
