CVE-2026-93673

Source
https://cve.org/CVERecord?id=CVE-2026-93673
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-93673.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2026-93673
Aliases
  • GHSA-vcpg-3c2r-7mxf
Published
2026-11-16T21:19:26Z
Modified
2026-11-19T01:04:13Z
Severity
  • 4.8 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N CVSS Calculator
Summary
WebSocket client accepts a handshake without verifying the full Sec-WebSocket-Accept value
Details

The Zephyr WebSocket client validates the server's handshake response in on_header_value() in subsys/net/lib/websocket/websocket.c. The comparison was performed as strncmp(at, str, length), where length is the length of the value the server sent rather than the length of the expected value, so the check only asked whether the received value was a prefix of the expected base64(SHA-1(key || GUID)). A server that returned a handful of correct characters passed, and a response carrying an empty Sec-WebSocket-Accept: header caused strncmp() to be called with a count of zero, which returns 0 and set ctx->sec_accept_ok with no comparison performed at all. The header-value callback also cleared ctx->sec_accept_present after the first chunk, so a value split across receive-buffer boundaries was only ever examined in part.

ctx->sec_accept_ok is the sole WebSocket-specific gate in websocket_connect(); the client does not check the HTTP status code or the Upgrade:/Connection: headers. Any HTTP response containing an empty or prefix-matching Sec-WebSocket-Accept header therefore completed the handshake, after which the socket is finalized as a WebSocket and all further peer bytes are parsed as frames. The affected path is driven directly by remote input through subsys/net/lib/http/http_parser.c, and is reached by every user of websocket_connect(), including MQTT over WebSocket (subsys/net/lib/mqtt/mqtt_transport_websocket.c) and subsys/net/lib/ocpp/ocpp.c.

The Sec-WebSocket-Accept exchange is not a secret-based authentication -- an endpoint or on-path attacker that sees the request can compute the expected value -- so the impact is bounded to parties that never observed the handshake request: a caching or transparent intermediary replaying a canned response, an off-path attacker injecting a spoofed response, or a non-WebSocket endpoint the client was induced to talk to. For those, the per-connection binding that RFC 6455 requires the client to enforce provided no protection at all, letting a single crafted response convince the device it holds a live WebSocket session and causing it to send application data to, and accept frames from, an unverified peer. There is no memory-safety consequence.

The fix compares each delivered chunk against the expected value at the position reached so far, refuses a chunk that would overrun it, and accepts only once every byte of the expected value -- and no more -- has been matched; on_header_field() now also clears the flag for any other header so a partial value cannot be continued across an intervening header.

Database specific
{
    "cna_assigner":  "zephyr",
    "cwe_ids":  [
        "CWE-345"
    ],
    "osv_generated_from":  "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/93xxx/CVE-2026-93673.json"
}
References

Affected packages

Git / github.com/zephyrproject-rtos/zephyr

Affected ranges

Type
GIT
Repo
https://github.com/zephyrproject-rtos/zephyr
Events
Database specific
Show details
{
    "extracted_events":  [
        {
            "range":  [
                {
                    "introduced":  "2.1.0"
                },
                {
                    "fixed":  "4.3.2"
                }
            ],
            "source":  "AFFECTED_FIELD",
            "strategy":  "StandardRange"
        },
        {
            "range":  [
                {
                    "introduced":  "4.4.0"
                },
                {
                    "fixed":  "4.5.0"
                }
            ],
            "source":  "AFFECTED_FIELD",
            "strategy":  "StandardRange"
        },
        {
            "range":  [
                {
                    "fixed":  "971a304afacf2bc72608ff3fc8cd23a74893654a"
                }
            ],
            "source":  "REFERENCES_COMMIT"
        }
    ]
}

Affected versions

v2.*
v2.1.0
v2.2.0
v2.2.0-rc1
v2.2.0-rc2
v2.2.0-rc3
v2.3.0
v2.3.0-rc1
v2.3.0-rc2
v2.4.0
v2.4.0-rc1
v2.4.0-rc2
v2.4.0-rc3
v2.5.0
v2.5.0-rc1
v2.5.0-rc2
v2.5.0-rc3
v2.5.0-rc4
v2.6.0
v2.6.0-rc1
v2.6.0-rc2
v2.6.0-rc3
v2.7.0-rc1
v2.7.0-rc2
v2.7.0-rc3
v2.7.99
v3.*
v3.0.0
v3.0.0-rc1
v3.0.0-rc2
v3.0.0-rc3
v3.1.0
v3.1.0-rc1
v3.1.0-rc2
v3.1.0-rc3
v3.2.0
v3.2.0-rc1
v3.2.0-rc2
v3.2.0-rc3
v3.3.0
v3.3.0-rc1
v3.3.0-rc2
v3.3.0-rc3
v3.4.0
v3.4.0-rc1
v3.4.0-rc2
v3.4.0-rc3
v3.5.0
v3.5.0-rc1
v3.5.0-rc2
v3.5.0-rc3
v3.6.0
v3.6.0-rc1
v3.6.0-rc2
v3.6.0-rc3
v3.7.0
v3.7.0-rc1
v3.7.0-rc2
v3.7.0-rc3
v4.*
v4.0.0
v4.0.0-rc1
v4.0.0-rc2
v4.0.0-rc3
v4.1.0
v4.1.0-rc1
v4.1.0-rc2
v4.1.0-rc3
v4.2.0
v4.2.0-rc1
v4.2.0-rc2
v4.2.0-rc3
v4.3.0
v4.3.0-rc1
v4.3.0-rc2
v4.3.0-rc3
v4.3.1
v4.3.1-rc1
v4.4.0
zephyr-v2.*
zephyr-v2.1.0
zephyr-v2.2.0
zephyr-v2.3.0
zephyr-v2.4.0
zephyr-v2.5.0
zephyr-v2.6.0
zephyr-v3.*
zephyr-v3.0.0
zephyr-v3.1.0
zephyr-v3.2.0
zephyr-v3.3.0
zephyr-v3.4.0
zephyr-v3.5.0

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-93673.json"
vanir_signatures
[
    {
        "deprecated":  false,
        "digest":  {
            "function_hash":  "176900888998188013685475288714528436653",
            "length":  519
        },
        "id":  "CVE-2026-93673-099d29b2",
        "signature_type":  "Function",
        "signature_version":  "v1",
        "source":  "https://github.com/zephyrproject-rtos/zephyr/commit/971a304afacf2bc72608ff3fc8cd23a74893654a",
        "target":  {
            "file":  "subsys/net/lib/websocket/websocket.c",
            "function":  "on_header_field"
        }
    },
    {
        "deprecated":  false,
        "digest":  {
            "function_hash":  "33758038994413133423502878356377058882",
            "length":  745
        },
        "id":  "CVE-2026-93673-50fd95f0",
        "signature_type":  "Function",
        "signature_version":  "v1",
        "source":  "https://github.com/zephyrproject-rtos/zephyr/commit/971a304afacf2bc72608ff3fc8cd23a74893654a",
        "target":  {
            "file":  "subsys/net/lib/websocket/websocket.c",
            "function":  "on_header_value"
        }
    },
    {
        "deprecated":  false,
        "digest":  {
            "line_hashes":  [
                "89526387704855418068850239295313536772",
                "20445001202312887772931226832364083631",
                "118589397598881789255897806049995750477"
            ],
            "threshold":  0.9
        },
        "id":  "CVE-2026-93673-98c12dec",
        "signature_type":  "Line",
        "signature_version":  "v1",
        "source":  "https://github.com/zephyrproject-rtos/zephyr/commit/971a304afacf2bc72608ff3fc8cd23a74893654a",
        "target":  {
            "file":  "subsys/net/lib/websocket/websocket_internal.h"
        }
    },
    {
        "deprecated":  false,
        "digest":  {
            "line_hashes":  [
                "155883626078318793447284439857098722861",
                "155360077961938352359279743863324787267",
                "255863743673683460132329056103600016616",
                "151318421834310406840237405435192448977",
                "54699230764540196894056469318077268229",
                "171459531598963955462630854559529330294",
                "182030377993184664163743977795680112447",
                "127506261105316707631869930746444344889",
                "114918562794149305600446182331301660706",
                "57047723952127892840051604712066290025",
                "209662118558939684431489728979833654892",
                "323313162060921341604952791381477591180",
                "9672769270042021005455787548010753175",
                "237975244899479853178395501156165409411",
                "307203065858115162112398171225583598500",
                "300245917191912050155202826546940378237"
            ],
            "threshold":  0.9
        },
        "id":  "CVE-2026-93673-cef5b76d",
        "signature_type":  "Line",
        "signature_version":  "v1",
        "source":  "https://github.com/zephyrproject-rtos/zephyr/commit/971a304afacf2bc72608ff3fc8cd23a74893654a",
        "target":  {
            "file":  "subsys/net/lib/websocket/websocket.c"
        }
    }
]
vanir_signatures_modified
"2026-11-19T01:04:13Z"