Join the Cyber Forum: Threat Intel on May 12, 2026 to learn how AI is reshaping threat defense.Join the Virtual Cyber Forum: Threat IntelRegister Now
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-21874

CVE-2026-21874: NiceGUI Redis Connection DOS Vulnerability

CVE-2026-21874 is a denial of service flaw in NiceGUI Python framework that allows attackers to exhaust Redis connections by repeatedly opening browser tabs. This post covers technical details, affected versions, and patches.

Updated: January 22, 2026

CVE-2026-21874 Overview

CVE-2026-21874 is a resource exhaustion vulnerability affecting NiceGUI, a Python-based UI framework. From versions v2.10.0 to 3.4.1, an unauthenticated attacker can exhaust Redis connections by repeatedly opening and closing browser tabs on any NiceGUI application using Redis-backed storage. The vulnerability occurs because connections are never properly released, leading to service degradation when Redis hits its connection limit. While NiceGUI continues accepting new connections and the application stays up, errors are logged and storage functionality becomes broken.

Critical Impact

Unauthenticated attackers can cause denial of service by exhausting Redis connection pools, degrading application storage functionality without taking down the service entirely.

Affected Products

  • NiceGUI versions v2.10.0 through 3.4.1
  • Applications using Redis-backed storage with NiceGUI
  • Python web applications built on affected NiceGUI versions

Discovery Timeline

  • 2026-01-08 - CVE CVE-2026-21874 published to NVD
  • 2026-01-08 - Last updated in NVD database

Technical Details for CVE-2026-21874

Vulnerability Analysis

This vulnerability is classified as CWE-772 (Missing Release of Resource after Effective Lifetime). The core issue lies in how NiceGUI manages Redis connections during client session lifecycle events. When users open browser tabs connecting to a NiceGUI application with Redis-backed storage, connections to Redis are established to handle persistent data. However, when those browser tabs are closed, the corresponding Redis connections are not properly released back to the connection pool.

An unauthenticated attacker can exploit this behavior by programmatically or manually opening and closing multiple browser tabs in rapid succession. Each tab opening establishes a new Redis connection, and each tab closing fails to release it. Over time, this exhausts the available Redis connections, causing the connection pool to hit its configured maximum limit.

Root Cause

The root cause is improper resource management in the client disconnect handling logic. When a client disconnects (browser tab closes), the tab_id tracking mechanism was not properly coordinating with the Redis connection cleanup. The patch reveals that the fix involved capturing the tab_id_to_close before clearing the tab_id reference, ensuring proper resource cleanup can occur. Additionally, the Redis persistent dictionary implementation was updated to include proper asyncio handling and context management for connection lifecycle.

Attack Vector

The attack is network-based and requires no authentication or user interaction. An attacker simply needs to:

  1. Identify a NiceGUI application using Redis-backed storage
  2. Repeatedly open connections to the application (browser tabs or automated HTTP connections)
  3. Close those connections without allowing proper cleanup
  4. Continue until Redis connection limit is reached

The attack does not crash the application outright—instead, it degrades storage functionality while the application continues to accept requests, potentially causing data inconsistencies and user session issues.

python
# Security patch in nicegui/client.py
# Source: https://github.com/zauberzeug/nicegui/commit/6c52eb2c90c4b67387c025b29646b4bc1578eb83
         document_id = self._socket_to_document_id.pop(socket_id)
         self._cancel_delete_task(document_id)
         self._num_connections[document_id] -= 1
+        tab_id_to_close = self.tab_id
         self.tab_id = None

         for t in self.disconnect_handlers:

The patch captures the tab_id before clearing it, allowing proper resource cleanup to be performed with the correct reference.

Detection Methods for CVE-2026-21874

Indicators of Compromise

  • Rapid increase in Redis connection count without corresponding increase in legitimate user sessions
  • Redis log entries indicating maximum connection limits being reached
  • NiceGUI application logs showing storage-related errors while the application remains responsive
  • Unusual patterns of WebSocket connections opening and closing rapidly from single or few IP addresses

Detection Strategies

  • Monitor Redis connection pool metrics using INFO clients command for abnormal connection growth
  • Implement rate limiting on new WebSocket connections per IP address
  • Set up alerts for Redis maxclients threshold warnings
  • Review NiceGUI application logs for repeated storage initialization failures

Monitoring Recommendations

  • Configure Redis monitoring tools (Redis Sentinel, Prometheus with Redis exporter) to track active connections
  • Implement application-level logging for client connect/disconnect events with correlation IDs
  • Set up automated alerts when Redis connections exceed 80% of maxclients configuration
  • Monitor for patterns of rapid session creation and termination from individual IP addresses

How to Mitigate CVE-2026-21874

Immediate Actions Required

  • Upgrade NiceGUI to version 3.5.0 or later immediately
  • Review and adjust Redis maxclients configuration based on expected legitimate traffic
  • Implement connection rate limiting at the network or application layer
  • Monitor Redis connection metrics for signs of exploitation attempts

Patch Information

The vulnerability has been patched in NiceGUI version 3.5.0. The fix addresses the resource leak by properly tracking and releasing Redis connections during client disconnect events. The patch is available in commit 6c52eb2c90c4b67387c025b29646b4bc1578eb83.

For detailed information, refer to:

  • GitHub Security Advisory GHSA-mp55-g7pj-rvm2
  • NiceGUI v3.5.0 Release

Workarounds

  • Configure Redis maxclients to a higher value to increase headroom while awaiting patch deployment
  • Implement a reverse proxy with connection rate limiting to slow potential attacks
  • Use Redis connection pooling with aggressive timeout settings to reclaim stale connections
  • Consider switching to alternative storage backends temporarily if Redis storage is not critical
bash
# Configuration example - Redis connection limit adjustment
# In redis.conf, increase maxclients (temporary mitigation)
maxclients 20000

# Set timeout to automatically close idle connections
timeout 300

# Enable connection monitoring
tcp-keepalive 60

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

  • Vulnerability Details
  • TypeDOS

  • Vendor/TechNicegui

  • SeverityMEDIUM

  • CVSS Score5.3

  • EPSS Probability0.03%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityLow
  • CWE References
  • CWE-772
  • Technical References
  • GitHub Commit Change

  • GitHub Release v3.5.0

  • GitHub Security Advisory GHSA-mp55-g7pj-rvm2
  • Related CVEs
  • CVE-2026-33332: Zauberzeug NiceGUI DoS Vulnerability

  • CVE-2026-39844: NiceGUI Path Traversal Vulnerability

  • CVE-2026-27156: Zauberzeug Nicegui XSS Vulnerability

  • CVE-2026-25732: NiceGUI Path Traversal Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now 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