Skip to content
Heist/ feed
Back to feed
Critical

Out-of-bounds read/write in HTTP WebSocket upgrade via non-null-terminated Sec-WebSocket-Key

Type: advisorySources: OSV

A remote, unauthenticated attacker can trigger memory corruption in Zephyr's HTTP server WebSocket upgrade path by sending a crafted Sec-WebSocket-Key header. The HTTP/1 header parser copies the header into a fixed-size buffer using a bounded copy that does not guarantee NUL termination when the input length reaches the buffer size. During upgrade handling the buffer is copied to a local stack buffer and passed to strlen(); if no NUL exists in-bounds, strlen() reads beyond the stack buffer and subsequent concatenation with the WebSocket magic string can write out of bounds. This leads to out-of-bounds read and write on stack memory, resulting in crash (denial of service) and potentially code execution. The path is reachable when CONFIG_HTTP_SERVER_WEBSOCKET is enabled.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-5067
Confirmed fixed CVEs
Not specified
Updated in this feed
3 Nov 2026, 09:49 UTC · Revision 1

Source evidence

Out-of-bounds read/write in HTTP WebSocket upgrade via non-null-terminated Sec-WebSocket-Key

core-osv · Original source

Published 9 Jun 2026, 06:01 UTC

A remote, unauthenticated attacker can trigger memory corruption in Zephyr's HTTP server WebSocket upgrade path by sending a crafted Sec-WebSocket-Key header. The HTTP/1 header parser copies the header into a fixed-size buffer using a bounded copy that does not guarantee NUL termination when the input length reaches the buffer size. During upgrade handling the buffer is copied to a local stack buffer and passed to strlen(); if no NUL exists in-bounds, strlen() reads beyond the stack buffer and subsequent concatenation with the WebSocket magic string can write out of bounds. This leads to out-of-bounds read and write on stack memory, resulting in crash (denial of service) and potentially code execution. The path is reachable when CONFIG_HTTP_SERVER_WEBSOCKET is enabled.

osv:CVE-2026-5067
Complete source record
{
  "id": "970a4ae31ac732030ef3b62ec42d2fe7e5c08a3bd84f07e1e7a2462a4725b8ca",
  "url": "https://osv.dev/vulnerability/CVE-2026-5067",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Out-of-bounds read/write in HTTP WebSocket upgrade via non-null-terminated Sec-WebSocket-Key",
    "summary": "A remote, unauthenticated attacker can trigger memory corruption in Zephyr's HTTP server WebSocket upgrade path by sending a crafted Sec-WebSocket-Key header. The HTTP/1 header parser copies the header into a fixed-size buffer using a bounded copy that does not guarantee NUL termination when the input length reaches the buffer size. During upgrade handling the buffer is copied to a local stack buffer and passed to strlen(); if no NUL exists in-bounds, strlen() reads beyond the stack buffer and subsequent concatenation with the WebSocket magic string can write out of bounds. This leads to out-of-bounds read and write on stack memory, resulting in crash (denial of service) and potentially code execution. The path is reachable when CONFIG_HTTP_SERVER_WEBSOCKET is enabled.",
    "evidence": "osv:CVE-2026-5067",
    "products": [],
    "severity": "critical",
    "structured": {
      "id": "CVE-2026-5067",
      "aliases": [
        "CVE-2026-5067",
        "GHSA-wgr4-9pwq-94vj"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/zephyrproject-rtos/zephyr",
              "type": "GIT",
              "events": [
                {
                  "introduced": "36940db938a8f4a1e919496793ed439850a221c2"
                },
                {
                  "fixed": "75f67d766726351b30199f9a2bf55803d717a3be"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "3.7.0"
                      },
                      {
                        "fixed": "4.3.1"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StandardRange"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v4.3.1-rc1",
            "v4.3.0",
            "v4.3.0-rc3",
            "v4.3.0-rc2",
            "v4.3.0-rc1",
            "v4.2.0",
            "v4.2.0-rc3",
            "v4.2.0-rc2",
            "v4.2.0-rc1",
            "v4.1.0",
            "v4.1.0-rc3",
            "v4.1.0-rc2",
            "v4.1.0-rc1",
            "v4.0.0",
            "v4.0.0-rc3",
            "v4.0.0-rc2",
            "v4.0.0-rc1",
            "v3.7.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-5067.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:27.779731531Z",
      "provider": "osv",
      "references": [
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/5xxx/CVE-2026-5067.json",
        "https://github.com/zephyrproject-rtos/zephyr/security/advisories/GHSA-wgr4-9pwq-94vj",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-5067",
        "https://github.com/zephyrproject-rtos/zephyr"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-170",
          "CWE-787"
        ],
        "cna_assigner": "zephyr",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/5xxx/CVE-2026-5067.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-5067",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 494321,
  "published_at": "2026-06-09T06:01:02.559+00:00"
}