A Leader in the 2026 Gartner® Magic Quadrant™ for Endpoint Protection. Six years running.Six years. Gartner® Magic Quadrant™ Leader.Find Out Why
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2026-45736

CVE-2026-45736: Ws WebSocket Information Disclosure Flaw

CVE-2026-45736 is an information disclosure vulnerability in ws WebSocket library for Node.js that exposes uninitialized memory when TypedArray is used. This article covers technical details, affected versions, and fixes.

Published: May 21, 2026

CVE-2026-45736 Overview

CVE-2026-45736 is an uninitialized memory disclosure vulnerability in ws, the popular open source WebSocket client and server library for Node.js. The flaw resides in the websocket.close() implementation, which fails to properly handle TypedArray values passed as the reason argument. When triggered, the function transmits uninitialized buffer memory to the remote peer, potentially leaking process memory contents over the network. The issue is tracked under [CWE-908: Use of Uninitialized Resource] and was fixed in ws version 8.20.1.

Critical Impact

Remote attackers or peers can receive fragments of uninitialized Node.js process memory through crafted WebSocket close frames, exposing potentially sensitive in-process data.

Affected Products

  • ws (WebSocket library for Node.js) — all versions prior to 8.20.1
  • Node.js applications and frameworks that depend on ws as a transitive or direct dependency
  • Server and client implementations invoking websocket.close() with TypedArray reason arguments

Discovery Timeline

  • 2026-05-15 - CVE-2026-45736 published to NVD
  • 2026-05-19 - Last updated in NVD database

Technical Details for CVE-2026-45736

Vulnerability Analysis

The ws library exposes a websocket.close(code, reason) API that allows callers to send a WebSocket close frame with an optional reason payload. Prior to version 8.20.1, the close frame construction logic in lib/sender.js did not validate that the reason argument was a plain Buffer or string. When a TypedArray such as Uint8Array, Uint16Array, or Float32Array was passed, the implementation allocated a buffer sized for the reason but did not correctly copy the typed array contents into the allocated region.

The resulting close frame was transmitted with the unwritten portion of the allocation still containing residual heap memory from prior allocations. That residual memory can include fragments of HTTP headers, session tokens, request bodies, cryptographic material, or any other data previously held by the Node.js process. The patch introduces an isUint8Array check using util.types to ensure typed array inputs are normalized before serialization.

Root Cause

The root cause is improper handling of TypedArray objects in the close frame serializer. TypedArray instances are not Buffer instances, so they bypass the standard Buffer.from() copy path. The serializer allocated memory based on the declared byte length but did not initialize or fully populate the destination, leaving uninitialized bytes in the outbound frame [CWE-908].

Attack Vector

Exploitation requires that an application accept a TypedArray value into the reason parameter of websocket.close(). This can occur in proxy implementations, gateway services, or any application that forwards client-supplied close reasons. The attacker observes the resulting close frame on the wire and extracts uninitialized memory bytes. The attack is network-based, requires no authentication, and no user interaction.

javascript
// Patch excerpt from lib/sender.js (ws 8.20.1)
 const { Duplex } = require('stream');
 const { randomFillSync } = require('crypto');
+const {
+  types: { isUint8Array }
+} = require('util');

 const PerMessageDeflate = require('./permessage-deflate');
 const { EMPTY_BUFFER, kWebSocket, NOOP } = require('./constants');
// Source: https://github.com/websockets/ws/commit/c0327ec15a54d701eb6ccefaa8bef328cfc03086

The patch imports isUint8Array from Node.js util.types so the sender can detect typed array inputs and normalize them before constructing the close frame.

Detection Methods for CVE-2026-45736

Indicators of Compromise

  • Outbound WebSocket close frames containing non-printable or high-entropy bytes in the reason field that do not match application-defined close reasons.
  • Anomalous close frame payloads of consistent length but varying content across sessions, suggesting buffer reuse leakage.
  • Application logs showing websocket.close() invocations with TypedArray arguments originating from untrusted input sources.

Detection Strategies

  • Inventory all Node.js applications and identify dependencies on ws versions prior to 8.20.1 using npm ls ws or software composition analysis tooling.
  • Inspect application source code for calls to ws.close() or websocket.close() where the reason parameter accepts client-controlled or TypedArray data.
  • Deploy WebSocket traffic inspection at gateways to flag close frames with reason payloads that deviate from documented application values.

Monitoring Recommendations

  • Enable verbose logging on WebSocket termination events, capturing the type and origin of the reason argument.
  • Monitor egress traffic from Node.js services for unusual WebSocket close frame sizes or entropy patterns.
  • Integrate dependency scanning into continuous integration pipelines to fail builds that pull vulnerable ws versions.

How to Mitigate CVE-2026-45736

Immediate Actions Required

  • Upgrade ws to version 8.20.1 or later in all Node.js applications and rebuild deployment artifacts.
  • Audit application code paths that forward client-supplied data into websocket.close() and reject TypedArray inputs at the application boundary.
  • Restart long-running Node.js services after upgrade to ensure the patched library is loaded into memory.

Patch Information

The vulnerability is fixed in ws version 8.20.1. The fix is committed in websockets/ws commit c0327ec and described in the GitHub Security Advisory GHSA-58qx-3vcg-4xpx. Application owners should update package.json and lock files, then verify the resolved version using npm ls ws.

Workarounds

  • Coerce all reason arguments to Buffer or string before invoking websocket.close(), for example Buffer.from(reason.buffer, reason.byteOffset, reason.byteLength).
  • Restrict the reason parameter to a fixed enumeration of application-defined strings rather than passing client-controlled data.
  • Place untrusted WebSocket termini behind a reverse proxy that strips or rewrites close frame reason payloads.
bash
# Upgrade ws to the patched version
npm install ws@^8.20.1

# Verify the resolved version across the dependency tree
npm ls ws

# Audit for known advisories
npm audit --production

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeInformation Disclosure

  • Vendor/TechWs Project

  • SeverityHIGH

  • CVSS Score7.5

  • EPSS Probability0.01%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-908
  • Vendor Resources
  • GitHub Commit Update

  • GitHub Security Advisory GHSA-58qx-3vcg-4xpx
  • Related CVEs
  • CVE-2021-32640: Ws WebSocket Library DoS Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English