2026-03-26 20:6CVE-2026-0968redhat
PUBLISHED5.2CWE-476

Libssh: libssh: denial of service due to malformed sftp message

A flaw was found in libssh in which a malicious SFTP (SSH File Transfer Protocol) server can exploit this by sending a malformed 'longname' field within an `SSH_FXP_NAME` message during a file listing operation. This missing null check can lead to reading beyond allocated memory on the heap. This can cause unexpected behavior or lead to a denial of service (DoS) due to application crashes.

Problem type

Affected products

Red Hat

Red Hat Enterprise Linux 10
Red Hat Enterprise Linux 6
Red Hat Enterprise Linux 7
Red Hat Enterprise Linux 8
Red Hat Enterprise Linux 9
Red Hat OpenShift Container Platform 4

References

GitHub Security Advisories

GHSA-6w3m-r3qq-cr2h

A flaw was found in libssh in which a malicious SFTP (SSH File Transfer Protocol) server can...

https://github.com/advisories/GHSA-6w3m-r3qq-cr2h

A flaw was found in libssh in which a malicious SFTP (SSH File Transfer Protocol) server can exploit this by sending a malformed 'longname' field within an SSH_FXP_NAME message during a file listing operation. This missing null check can lead to reading beyond allocated memory on the heap. This can cause unexpected behavior or lead to a denial of service (DoS) due to application crashes.

JSON source

https://cveawg.mitre.org/api/cve/CVE-2026-0968
Click to expand
{
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "cveMetadata": {
    "cveId": "CVE-2026-0968",
    "assignerOrgId": "53f830b8-0a3f-465b-8143-3b8a9948e749",
    "assignerShortName": "redhat",
    "dateUpdated": "2026-03-26T20:06:29.554Z",
    "dateReserved": "2026-01-14T21:55:14.053Z",
    "datePublished": "2026-03-26T20:06:29.554Z",
    "state": "PUBLISHED"
  },
  "containers": {
    "cna": {
      "providerMetadata": {
        "orgId": "53f830b8-0a3f-465b-8143-3b8a9948e749",
        "shortName": "redhat",
        "dateUpdated": "2026-03-26T20:06:29.554Z"
      },
      "datePublic": "2026-02-10T18:46:58.858Z",
      "title": "Libssh: libssh: denial of service due to malformed sftp message",
      "descriptions": [
        {
          "lang": "en",
          "value": "A flaw was found in libssh in which a malicious SFTP (SSH File Transfer Protocol) server can exploit this by sending a malformed 'longname' field within an `SSH_FXP_NAME` message during a file listing operation. This missing null check can lead to reading beyond allocated memory on the heap. This can cause unexpected behavior or lead to a denial of service (DoS) due to application crashes."
        }
      ],
      "affected": [
        {
          "vendor": "Red Hat",
          "product": "Red Hat Enterprise Linux 10",
          "collectionURL": "https://access.redhat.com/downloads/content/package-browser/",
          "packageName": "libssh",
          "cpes": [
            "cpe:/o:redhat:enterprise_linux:10"
          ],
          "defaultStatus": "affected"
        },
        {
          "vendor": "Red Hat",
          "product": "Red Hat Enterprise Linux 6",
          "collectionURL": "https://access.redhat.com/downloads/content/package-browser/",
          "packageName": "libssh2",
          "cpes": [
            "cpe:/o:redhat:enterprise_linux:6"
          ],
          "defaultStatus": "unaffected"
        },
        {
          "vendor": "Red Hat",
          "product": "Red Hat Enterprise Linux 7",
          "collectionURL": "https://access.redhat.com/downloads/content/package-browser/",
          "packageName": "libssh2",
          "cpes": [
            "cpe:/o:redhat:enterprise_linux:7"
          ],
          "defaultStatus": "unaffected"
        },
        {
          "vendor": "Red Hat",
          "product": "Red Hat Enterprise Linux 8",
          "collectionURL": "https://access.redhat.com/downloads/content/package-browser/",
          "packageName": "libssh",
          "cpes": [
            "cpe:/o:redhat:enterprise_linux:8"
          ],
          "defaultStatus": "affected"
        },
        {
          "vendor": "Red Hat",
          "product": "Red Hat Enterprise Linux 9",
          "collectionURL": "https://access.redhat.com/downloads/content/package-browser/",
          "packageName": "libssh",
          "cpes": [
            "cpe:/o:redhat:enterprise_linux:9"
          ],
          "defaultStatus": "affected"
        },
        {
          "vendor": "Red Hat",
          "product": "Red Hat OpenShift Container Platform 4",
          "collectionURL": "https://access.redhat.com/downloads/content/package-browser/",
          "packageName": "rhcos",
          "cpes": [
            "cpe:/a:redhat:openshift:4"
          ],
          "defaultStatus": "affected"
        }
      ],
      "problemTypes": [
        {
          "descriptions": [
            {
              "lang": "en",
              "description": "NULL Pointer Dereference",
              "cweId": "CWE-476",
              "type": "CWE"
            }
          ]
        }
      ],
      "references": [
        {
          "url": "https://access.redhat.com/security/cve/CVE-2026-0968",
          "tags": [
            "vdb-entry",
            "x_refsource_REDHAT"
          ]
        },
        {
          "url": "https://bugzilla.redhat.com/show_bug.cgi?id=2436982",
          "name": "RHBZ#2436982",
          "tags": [
            "issue-tracking",
            "x_refsource_REDHAT"
          ]
        }
      ],
      "metrics": [
        {},
        {
          "format": "CVSS",
          "cvssV3_0": {
            "version": "3.0",
            "vectorString": "CVSS:3.0/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:N/A:L",
            "attackVector": "NETWORK",
            "attackComplexity": "HIGH",
            "privilegesRequired": "NONE",
            "userInteraction": "REQUIRED",
            "scope": "UNCHANGED",
            "confidentialityImpact": "NONE",
            "integrityImpact": "NONE",
            "availabilityImpact": "LOW",
            "baseScore": 3.1,
            "baseSeverity": "LOW"
          }
        }
      ],
      "timeline": [
        {
          "time": "2026-02-04T23:46:17.534Z",
          "lang": "en",
          "value": "Reported to Red Hat."
        },
        {
          "time": "2026-02-10T18:46:58.858Z",
          "lang": "en",
          "value": "Made public."
        }
      ],
      "credits": [
        {
          "lang": "en",
          "value": "Red Hat would like to thank Jakub Jelen (libssh) and nevv (CTyun Red-Shield Security Lab) for reporting this issue."
        }
      ]
    }
  }
}