{
  "id": "CVE-2026-66035",
  "url": "https://poc.griffinguard.io/cve/CVE-2026-66035",
  "published_at": "2026-07-24T16:45:24.405Z",
  "title": "libssh2 Heap Buffer Overflow via ETM Cipher Negotiation",
  "vendor": "libssh2",
  "product": "libssh2",
  "cvss": {
    "score": 7.7,
    "source": "cna",
    "vector": "CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
  },
  "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": "libssh2 through 1.11.1, fixed in commit 42e33d8, contains a pre-authentication heap buffer overflow vulnerability that allows a malicious SSH server to corrupt heap metadata in any connecting client by sending a packet with a packet_length smaller than the cipher's block size during Encrypt-then-MAC cipher negotiation. In the fullpacket() function in src/transport.c, the ETM path allocates a buffer of packet_length bytes but copies blocksize minus one bytes via memcpy, causing an overflow that on 32-bit glibc writes attacker-controlled bytes into an adjacent chunk's SIZE field, enabling tcache bin confusion, overlapping live objects, and function pointer overwrite during the session handshake before authentication.",
  "cwe": "CWE-122",
  "cpes": [
    "cpe:2.3:a:libssh2:libssh2:*:*:*:*:*:*:*:*"
  ],
  "cvss_by_source": {
    "cna": 7.7
  },
  "repos": [],
  "remediation": {
    "affected": [
      {
        "vendor": "libssh2",
        "product": "libssh2",
        "ranges": [
          "\u003c= 1.11.1"
        ],
        "fixed_in": [
          "42e33d81577ed4b95d4b4f6f845e5ee8efe5eeb4"
        ]
      }
    ],
    "upgrade": [
      "Upgrade libssh2 to 42e33d81577ed4b95d4b4f6f845e5ee8efe5eeb4 or later."
    ],
    "references": [
      {
        "kind": "Patch",
        "url": "https://github.com/libssh2/libssh2/pull/2198"
      },
      {
        "kind": "Patch",
        "url": "https://github.com/libssh2/libssh2/commit/42e33d81577ed4b95d4b4f6f845e5ee8efe5eeb4"
      }
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [],
  "rules": []
}
