{
  "id": "CVE-2025-5318",
  "url": "https://poc.griffinguard.io/cve/CVE-2025-5318",
  "published_at": "2025-06-24T14:10:07.188Z",
  "title": "Libssh: out-of-bounds read in sftp_handle()",
  "vendor": "Red Hat",
  "product": "Red Hat Enterprise Linux 10",
  "cvss": {
    "score": 8.1,
    "source": "nvd",
    "vector": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H"
  },
  "kev": {
    "in_kev": false,
    "added_at": null,
    "days_after_publication": null
  },
  "first_poc": null,
  "poc_repo_count": 0,
  "exploit_count": 0,
  "suspicious_repo_count": 0,
  "edge_device": null,
  "description": "A flaw was found in the libssh library in versions less than 0.11.2. An out-of-bounds read can be triggered in the sftp_handle function due to an incorrect comparison check that permits the function to access memory beyond the valid handle list and to return an invalid pointer, which is used in further processing. This vulnerability allows an authenticated remote attacker to potentially read unintended memory regions, exposing sensitive information or affect service behavior.",
  "cwe": "CWE-125",
  "cpes": [
    "cpe:2.3:a:libssh:libssh:*:*:*:*:*:*:*:*",
    "cpe:2.3:a:redhat:openshift_container_platform:4.0:*:*:*:*:*:*:*",
    "cpe:2.3:o:redhat:enterprise_linux:10.0:*:*:*:*:*:*:*",
    "cpe:2.3:o:redhat:enterprise_linux:8.0:*:*:*:*:*:*:*",
    "cpe:2.3:o:redhat:enterprise_linux:9.0:*:*:*:*:*:*:*"
  ],
  "cvss_by_source": {
    "cna": 5.4,
    "nvd": 8.1
  },
  "repos": [],
  "remediation": {
    "affected": [
      {
        "vendor": "",
        "product": "",
        "ranges": [
          "\u003c 0.11.2"
        ],
        "fixed_in": [
          "0.11.2"
        ]
      },
      {
        "vendor": "Red Hat",
        "product": "Red Hat Enterprise Linux 10",
        "ranges": null,
        "fixed_in": [
          "0:0.11.1-4.el10_0"
        ]
      },
      {
        "vendor": "Red Hat",
        "product": "Red Hat Enterprise Linux 10",
        "ranges": null,
        "fixed_in": [
          "0:0.11.1-4.el10_1"
        ]
      },
      {
        "vendor": "Red Hat",
        "product": "Red Hat Enterprise Linux 8",
        "ranges": null,
        "fixed_in": [
          "0:0.9.6-15.el8_10"
        ]
      },
      {
        "vendor": "Red Hat",
        "product": "Red Hat Enterprise Linux 8",
        "ranges": null,
        "fixed_in": [
          "0:0.9.6-15.el8_10"
        ]
      },
      {
        "vendor": "Red Hat",
        "product": "Red Hat Enterprise Linux 8.2 Advanced Update Support",
        "ranges": null,
        "fixed_in": [
          "0:0.9.0-4.el8_2.1"
        ]
      },
      {
        "vendor": "Red Hat",
        "product": "Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Support",
        "ranges": null,
        "fixed_in": [
          "0:0.9.4-2.el8_4.1"
        ]
      },
      {
        "vendor": "Red Hat",
        "product": "Red Hat Enterprise Linux 8.4 Extended Update Support Long-Life Add-On",
        "ranges": null,
        "fixed_in": [
          "0:0.9.4-2.el8_4.1"
        ]
      },
      {
        "vendor": "Red Hat",
        "product": "Red Hat Enterprise Linux 8.6 Advanced Mission Critical Update Support",
        "ranges": null,
        "fixed_in": [
          "0:0.9.6-4.el8_6.1"
        ]
      },
      {
        "vendor": "Red Hat",
        "product": "Red Hat Enterprise Linux 8.6 Telecommunications Update Service",
        "ranges": null,
        "fixed_in": [
          "0:0.9.6-4.el8_6.1"
        ]
      },
      {
        "vendor": "Red Hat",
        "product": "Red Hat Enterprise Linux 8.6 Update Services for SAP Solutions",
        "ranges": null,
        "fixed_in": [
          "0:0.9.6-4.el8_6.1"
        ]
      },
      {
        "vendor": "Red Hat",
        "product": "Red Hat Enterprise Linux 8.8 Telecommunications Update Service",
        "ranges": null,
        "fixed_in": [
          "0:0.9.6-13.el8_8.1"
        ]
      },
      {
        "vendor": "Red Hat",
        "product": "Red Hat Enterprise Linux 8.8 Update Services for SAP Solutions",
        "ranges": null,
        "fixed_in": [
          "0:0.9.6-13.el8_8.1"
        ]
      },
      {
        "vendor": "Red Hat",
        "product": "Red Hat Enterprise Linux 9",
        "ranges": null,
        "fixed_in": [
          "0:0.10.4-15.el9_6"
        ]
      },
      {
        "vendor": "Red Hat",
        "product": "Red Hat Enterprise Linux 9",
        "ranges": null,
        "fixed_in": [
          "0:0.10.4-15.el9_7"
        ]
      },
      {
        "vendor": "Red Hat",
        "product": "Red Hat Enterprise Linux 9",
        "ranges": null,
        "fixed_in": [
          "0:0.10.4-15.el9_6"
        ]
      },
      {
        "vendor": "Red Hat",
        "product": "Red Hat Enterprise Linux 9",
        "ranges": null,
        "fixed_in": [
          "0:0.10.4-15.el9_7"
        ]
      },
      {
        "vendor": "Red Hat",
        "product": "Red Hat Enterprise Linux 9.0 Update Services for SAP Solutions",
        "ranges": null,
        "fixed_in": [
          "0:0.9.6-3.el9_0.1"
        ]
      },
      {
        "vendor": "Red Hat",
        "product": "Red Hat Enterprise Linux 9.2 Update Services for SAP Solutions",
        "ranges": null,
        "fixed_in": [
          "0:0.10.4-9.el9_2.1"
        ]
      },
      {
        "vendor": "Red Hat",
        "product": "Red Hat Enterprise Linux 9.4 Extended Update Support",
        "ranges": null,
        "fixed_in": [
          "0:0.10.4-13.el9_4.1"
        ]
      },
      {
        "vendor": "Red Hat",
        "product": "Red Hat OpenShift Container Platform 4.12",
        "ranges": null,
        "fixed_in": [
          "412.86.202511191939-0"
        ]
      },
      {
        "vendor": "Red Hat",
        "product": "Red Hat OpenShift Container Platform 4.13",
        "ranges": null,
        "fixed_in": [
          "413.92.202511261311-0"
        ]
      },
      {
        "vendor": "Red Hat",
        "product": "Red Hat OpenShift Container Platform 4.14",
        "ranges": null,
        "fixed_in": [
          "414.92.202511122212-0"
        ]
      },
      {
        "vendor": "Red Hat",
        "product": "Red Hat OpenShift Container Platform 4.15",
        "ranges": null,
        "fixed_in": [
          "415.92.202601271320-0"
        ]
      },
      {
        "vendor": "Red Hat",
        "product": "Red Hat OpenShift Container Platform 4.16",
        "ranges": null,
        "fixed_in": [
          "416.94.202601071926-0"
        ]
      },
      {
        "vendor": "Red Hat",
        "product": "Red Hat OpenShift Container Platform 4.17",
        "ranges": null,
        "fixed_in": [
          "417.94.202510282022-0"
        ]
      },
      {
        "vendor": "Red Hat",
        "product": "Red Hat OpenShift Container Platform 4.18",
        "ranges": null,
        "fixed_in": [
          "418.94.202511041748-0"
        ]
      },
      {
        "vendor": "Red Hat",
        "product": "Red Hat OpenShift Container Platform 4.19",
        "ranges": null,
        "fixed_in": [
          "4.19.9.6.202510281054-0"
        ]
      },
      {
        "vendor": "Red Hat",
        "product": "Red Hat OpenShift Container Platform 4.20",
        "ranges": null,
        "fixed_in": [
          "4.20.9.6.202510290321-0"
        ]
      },
      {
        "vendor": "Red Hat",
        "product": "Red Hat AI Inference Server 3.2",
        "ranges": null,
        "fixed_in": [
          "3.2.2-1765379088"
        ]
      },
      {
        "vendor": "Red Hat",
        "product": "Red Hat AI Inference Server 3.2",
        "ranges": null,
        "fixed_in": [
          "3.2.2-1765379049"
        ]
      },
      {
        "vendor": "Red Hat",
        "product": "Red Hat AI Inference Server 3.2",
        "ranges": null,
        "fixed_in": [
          "3.2.2-1764871796"
        ]
      },
      {
        "vendor": "Red Hat",
        "product": "Red Hat AI Inference Server 3.2",
        "ranges": null,
        "fixed_in": [
          "1772160593"
        ]
      },
      {
        "vendor": "Red Hat",
        "product": "Red Hat AI Inference Server 3.2",
        "ranges": null,
        "fixed_in": [
          "1772160625"
        ]
      },
      {
        "vendor": "Red Hat",
        "product": "Red Hat OpenShift distributed tracing 3.7.0",
        "ranges": null,
        "fixed_in": [
          "rhosdt-3.7-1762254546"
        ]
      },
      {
        "vendor": "Red Hat",
        "product": "Red Hat OpenShift distributed tracing 3.7.0",
        "ranges": null,
        "fixed_in": [
          "rhosdt-3.7-1762254552"
        ]
      },
      {
        "vendor": "Red Hat",
        "product": "Red Hat OpenShift distributed tracing 3.7.0",
        "ranges": null,
        "fixed_in": [
          "rhosdt-3.7-1762255881"
        ]
      },
      {
        "vendor": "Red Hat",
        "product": "Red Hat OpenShift distributed tracing 3.7.0",
        "ranges": null,
        "fixed_in": [
          "rhosdt-3.7-1762254530"
        ]
      },
      {
        "vendor": "Red Hat",
        "product": "Red Hat OpenShift distributed tracing 3.7.0",
        "ranges": null,
        "fixed_in": [
          "rhosdt-3.7-1762254519"
        ]
      },
      {
        "vendor": "Red Hat",
        "product": "Red Hat OpenShift distributed tracing 3.7.0",
        "ranges": null,
        "fixed_in": [
          "rhosdt-3.7-1762254545"
        ]
      }
    ],
    "upgrade": [
      "Upgrade the affected product to 0.11.2 or later.",
      "Upgrade Red Hat Enterprise Linux 10 to 0:0.11.1-4.el10_0 or later.",
      "Upgrade Red Hat Enterprise Linux 10 to 0:0.11.1-4.el10_1 or later.",
      "Upgrade Red Hat Enterprise Linux 8 to 0:0.9.6-15.el8_10 or later.",
      "Upgrade Red Hat Enterprise Linux 8 to 0:0.9.6-15.el8_10 or later.",
      "Upgrade Red Hat Enterprise Linux 8.2 Advanced Update Support to 0:0.9.0-4.el8_2.1 or later.",
      "Upgrade Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Support to 0:0.9.4-2.el8_4.1 or later.",
      "Upgrade Red Hat Enterprise Linux 8.4 Extended Update Support Long-Life Add-On to 0:0.9.4-2.el8_4.1 or later.",
      "Upgrade Red Hat Enterprise Linux 8.6 Advanced Mission Critical Update Support to 0:0.9.6-4.el8_6.1 or later.",
      "Upgrade Red Hat Enterprise Linux 8.6 Telecommunications Update Service to 0:0.9.6-4.el8_6.1 or later.",
      "Upgrade Red Hat Enterprise Linux 8.6 Update Services for SAP Solutions to 0:0.9.6-4.el8_6.1 or later.",
      "Upgrade Red Hat Enterprise Linux 8.8 Telecommunications Update Service to 0:0.9.6-13.el8_8.1 or later.",
      "Upgrade Red Hat Enterprise Linux 8.8 Update Services for SAP Solutions to 0:0.9.6-13.el8_8.1 or later.",
      "Upgrade Red Hat Enterprise Linux 9 to 0:0.10.4-15.el9_6 or later.",
      "Upgrade Red Hat Enterprise Linux 9 to 0:0.10.4-15.el9_7 or later.",
      "Upgrade Red Hat Enterprise Linux 9 to 0:0.10.4-15.el9_6 or later.",
      "Upgrade Red Hat Enterprise Linux 9 to 0:0.10.4-15.el9_7 or later.",
      "Upgrade Red Hat Enterprise Linux 9.0 Update Services for SAP Solutions to 0:0.9.6-3.el9_0.1 or later.",
      "Upgrade Red Hat Enterprise Linux 9.2 Update Services for SAP Solutions to 0:0.10.4-9.el9_2.1 or later.",
      "Upgrade Red Hat Enterprise Linux 9.4 Extended Update Support to 0:0.10.4-13.el9_4.1 or later.",
      "Upgrade Red Hat OpenShift Container Platform 4.12 to 412.86.202511191939-0 or later.",
      "Upgrade Red Hat OpenShift Container Platform 4.13 to 413.92.202511261311-0 or later.",
      "Upgrade Red Hat OpenShift Container Platform 4.14 to 414.92.202511122212-0 or later.",
      "Upgrade Red Hat OpenShift Container Platform 4.15 to 415.92.202601271320-0 or later.",
      "Upgrade Red Hat OpenShift Container Platform 4.16 to 416.94.202601071926-0 or later.",
      "Upgrade Red Hat OpenShift Container Platform 4.17 to 417.94.202510282022-0 or later.",
      "Upgrade Red Hat OpenShift Container Platform 4.18 to 418.94.202511041748-0 or later.",
      "Upgrade Red Hat OpenShift Container Platform 4.19 to 4.19.9.6.202510281054-0 or later.",
      "Upgrade Red Hat OpenShift Container Platform 4.20 to 4.20.9.6.202510290321-0 or later.",
      "Upgrade Red Hat AI Inference Server 3.2 to 3.2.2-1765379088 or later.",
      "Upgrade Red Hat AI Inference Server 3.2 to 3.2.2-1765379049 or later.",
      "Upgrade Red Hat AI Inference Server 3.2 to 3.2.2-1764871796 or later.",
      "Upgrade Red Hat AI Inference Server 3.2 to 1772160593 or later.",
      "Upgrade Red Hat AI Inference Server 3.2 to 1772160625 or later.",
      "Upgrade Red Hat OpenShift distributed tracing 3.7.0 to rhosdt-3.7-1762254546 or later.",
      "Upgrade Red Hat OpenShift distributed tracing 3.7.0 to rhosdt-3.7-1762254552 or later.",
      "Upgrade Red Hat OpenShift distributed tracing 3.7.0 to rhosdt-3.7-1762255881 or later.",
      "Upgrade Red Hat OpenShift distributed tracing 3.7.0 to rhosdt-3.7-1762254530 or later.",
      "Upgrade Red Hat OpenShift distributed tracing 3.7.0 to rhosdt-3.7-1762254519 or later.",
      "Upgrade Red Hat OpenShift distributed tracing 3.7.0 to rhosdt-3.7-1762254545 or later."
    ],
    "workarounds": [
      "Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability."
    ],
    "references": [
      {
        "kind": "Vendor advisory",
        "url": "https://access.redhat.com/errata/RHSA-2025:18231"
      },
      {
        "kind": "Vendor advisory",
        "url": "https://access.redhat.com/errata/RHSA-2025:18275"
      },
      {
        "kind": "Vendor advisory",
        "url": "https://access.redhat.com/errata/RHSA-2025:18286"
      },
      {
        "kind": "Vendor advisory",
        "url": "https://access.redhat.com/errata/RHSA-2025:19012"
      },
      {
        "kind": "Vendor advisory",
        "url": "https://access.redhat.com/errata/RHSA-2025:19098"
      },
      {
        "kind": "Vendor advisory",
        "url": "https://access.redhat.com/errata/RHSA-2025:19101"
      },
      {
        "kind": "Vendor advisory",
        "url": "https://access.redhat.com/errata/RHSA-2025:19295"
      },
      {
        "kind": "Vendor advisory",
        "url": "https://access.redhat.com/errata/RHSA-2025:19300"
      }
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [],
  "rules": []
}
