2026-03-19 17:25CVE-2026-2646wolfSSL
PUBLISHED5.2CWE-122

Heap buffer overflow in session parsing with wolfSSL_d2i_SSL_SESSION() function

A heap-buffer-overflow vulnerability exists in wolfSSL's wolfSSL_d2i_SSL_SESSION() function. When deserializing session data with SESSION_CERTS enabled, certificate and session id lengths are read from an untrusted input without bounds validation, allowing an attacker to overflow fixed-size buffers and corrupt heap memory. A maliciously crafted session would need to be loaded from an external source to trigger this vulnerability. Internal sessions were not vulnerable.

Problem type

Affected products

wolfssl

wolfssl

<= 5.8.4 - AFFECTED

References

GitHub Security Advisories

GHSA-24vq-qfc5-qrmj

A heap-buffer-overflow vulnerability exists in wolfSSL's wolfSSL_d2i_SSL_SESSION() function. When...

https://github.com/advisories/GHSA-24vq-qfc5-qrmj

A heap-buffer-overflow vulnerability exists in wolfSSL's wolfSSL_d2i_SSL_SESSION() function. When deserializing session data with SESSION_CERTS enabled, certificate and session id lengths are read from an untrusted input without bounds validation, allowing an attacker to overflow fixed-size buffers and corrupt heap memory. A maliciously crafted session would need to be loaded from an external source to trigger this vulnerability. Internal sessions were not vulnerable.

JSON source

https://cveawg.mitre.org/api/cve/CVE-2026-2646
Click to expand
{
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "cveMetadata": {
    "cveId": "CVE-2026-2646",
    "assignerOrgId": "50d2cd11-d01a-48ed-9441-5bfce9d63b27",
    "assignerShortName": "wolfSSL",
    "dateUpdated": "2026-03-19T17:44:09.675Z",
    "dateReserved": "2026-02-17T22:29:37.732Z",
    "datePublished": "2026-03-19T17:25:42.810Z",
    "state": "PUBLISHED"
  },
  "containers": {
    "cna": {
      "providerMetadata": {
        "orgId": "50d2cd11-d01a-48ed-9441-5bfce9d63b27",
        "shortName": "wolfSSL",
        "dateUpdated": "2026-03-19T17:25:42.810Z"
      },
      "title": "Heap buffer overflow in session parsing with wolfSSL_d2i_SSL_SESSION() function",
      "descriptions": [
        {
          "lang": "en",
          "value": "A heap-buffer-overflow vulnerability exists in wolfSSL's wolfSSL_d2i_SSL_SESSION() function. When deserializing session data with SESSION_CERTS enabled, certificate and session id lengths are read from an untrusted input without bounds validation, allowing an attacker to overflow fixed-size buffers and corrupt heap memory. A maliciously crafted session would need to be loaded from an external source to trigger this vulnerability. Internal sessions were not vulnerable.",
          "supportingMedia": [
            {
              "type": "text/html",
              "base64": false,
              "value": "A heap-buffer-overflow vulnerability exists in wolfSSL's wolfSSL_d2i_SSL_SESSION() function. When deserializing session data with SESSION_CERTS enabled, certificate and session id lengths are read from an untrusted input without bounds validation, allowing an attacker to overflow fixed-size buffers and corrupt heap memory. A maliciously crafted session would need to be loaded from an external source to trigger this vulnerability. Internal sessions were not vulnerable.<br><br>"
            }
          ]
        }
      ],
      "affected": [
        {
          "vendor": "wolfssl",
          "product": "wolfssl",
          "programFiles": [
            "src/ssl_sess.c"
          ],
          "programRoutines": [
            {
              "name": "wolfSSL_d2i_SSL_SESSION"
            }
          ],
          "repo": "https://github.com/wolfSSL/wolfssl",
          "defaultStatus": "unaffected",
          "versions": [
            {
              "version": "0",
              "status": "affected",
              "versionType": "semver",
              "lessThanOrEqual": "5.8.4"
            }
          ]
        }
      ],
      "problemTypes": [
        {
          "descriptions": [
            {
              "lang": "en",
              "description": "CWE-122 Heap-based Buffer Overflow",
              "cweId": "CWE-122",
              "type": "CWE"
            }
          ]
        }
      ],
      "references": [
        {
          "url": "https://github.com/wolfSSL/wolfssl/pull/9748"
        },
        {
          "url": "https://github.com/wolfSSL/wolfssl/pull/9949"
        }
      ],
      "impacts": [
        {
          "capecId": "CAPEC-100",
          "descriptions": [
            {
              "lang": "en",
              "value": "CAPEC-100 Overflow Buffers"
            }
          ]
        }
      ],
      "metrics": [
        {
          "format": "CVSS",
          "scenarios": [
            {
              "lang": "en",
              "value": "GENERAL"
            }
          ]
        }
      ],
      "credits": [
        {
          "lang": "en",
          "value": "Jonathan Bar Or (@yo_yo_yo_jbo)",
          "type": "finder"
        },
        {
          "lang": "en",
          "value": "Haruto Kimura (Stella)",
          "type": "finder"
        }
      ]
    },
    "adp": [
      {
        "providerMetadata": {
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP",
          "dateUpdated": "2026-03-19T17:44:09.675Z"
        },
        "title": "CISA ADP Vulnrichment",
        "metrics": [
          {}
        ]
      }
    ]
  }
}