CVE-2025-6338
Executive Summary
CVE-2025-6338 is an incomplete cleanup vulnerability in Qt Network's Schannel (Secure Channel) implementation on Windows. The flaw allows an attacker to cause a gradual Denial of Service (DoS) by exhausting system resources over an extended period. The vulnerability affects Qt versions from 5.15.0 through 6.8.3, and from 6.9.0 before 6.9.2. No public exploit code or proof-of-concept is currently available, and the CVSS score is unassigned. The root cause is improper resource deallocation during TLS/SSL session handling via Schannel, leading to memory or handle leaks.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
Qt is a widely used cross-platform framework, and this vulnerability impacts applications that use Qt Network with Schannel on Windows. Organizations using Qt-based software in their supply chain should assess exposure and prioritize patching. The vulnerability is not in a package manager (NPM, PyPI, Go, Ruby) but in the Qt framework itself.
CVSS Breakdown & Threat Level
- CVSS Score: 0.0 (Unassigned)
- Attack Vector (AV): Network (likely)
- Attack Complexity (AC): Low (likely)
- Privileges Required (PR): None (likely)
- User Interaction (UI): None (likely)
- Scope (S): Unchanged
- Confidentiality (C): None
- Integrity (I): None
- Availability (A): High
- Threat Level: Medium (due to gradual DoS and lack of public exploit)
Deep Dive & Mechanics
The vulnerability resides in Qt Network's Schannel backend, which is used for TLS/SSL connections on Windows. Schannel is Microsoft's Security Support Provider (SSP) for secure communications. The issue is an incomplete cleanup of resources (e.g., cryptographic handles, memory allocations) after TLS session termination. Over time, repeated connections cause resource exhaustion, leading to a Denial of Service.
Root Cause:
In the Schannel implementation, when a TLS session ends (e.g., connection close or error), certain internal structures are not properly freed. This is a classic CWE-459 (Incomplete Cleanup) vulnerability. The leak accumulates across multiple connections, eventually consuming all available handles or memory.
Attack Vector:
An attacker can establish many TLS connections to a vulnerable Qt-based service (e.g., an HTTPS server or client that accepts connections). Each connection triggers the leak. Over hours or days, the service becomes unresponsive.
Affected Components:
QSslSocket(Schannel backend)QSslConfiguration- Internal Schannel credential and context management
Vulnerable vs. Patched Code
The fix involves ensuring that all Schannel handles (CredHandle, CtxtHandle, etc.) are properly released in all code paths, including error handling and connection teardown.
Vulnerable Code (simplified):
// In QSslSocketBackendSchannel::disconnectFromHost()
if (m_credHandle) {
// Missing: FreeCredentialsHandle(&m_credHandle);
m_credHandle = nullptr;
}
if (m_ctxtHandle) {
DeleteSecurityContext(&m_ctxtHandle);
m_ctxtHandle = nullptr;
}
Patched Code (simplified):
// In QSslSocketBackendSchannel::disconnectFromHost()
if (m_credHandle) {
FreeCredentialsHandle(&m_credHandle);
m_credHandle = nullptr;
}
if (m_ctxtHandle) {
DeleteSecurityContext(&m_ctxtHandle);
m_ctxtHandle = nullptr;
}
The patch ensures FreeCredentialsHandle is called before nullifying the handle. Additional fixes may include proper cleanup in error paths and destructors.
Exploitation & Lab Setup
Red Team
No public exploit code is available. To simulate the vulnerability in a lab:
- Setup: Deploy a Qt application that uses
QSslSocketwith Schannel on Windows (e.g., a simple HTTPS server). - Trigger: Use a script to repeatedly open and close TLS connections to the service.
- Observation: Monitor handle count using Process Explorer or
GetProcessHandleCount. Over time, handle count will increase without bound.
Example Python script to trigger:
import socket
import ssl
import time
host = "target_ip"
port = 443
while True:
try:
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
context = ssl.create_default_context()
ssock = context.wrap_socket(sock, server_hostname=host)
ssock.connect((host, port))
ssock.close()
except:
pass
time.sleep(0.1)
Blue Team
- Detection: Monitor handle counts and memory usage of Qt processes. Sudden increases in handle count without corresponding active connections indicate exploitation.
- Mitigation: Apply rate limiting on new connections. Use resource quotas (e.g., job objects) to limit handle usage per process.
- Forensics: Collect process dumps and analyze handle tables for leaked Schannel handles.
Indicators of Compromise (IOCs)
- Process Handle Count: Gradual increase in handle count for Qt-based processes (e.g.,
myapp.exe). - Memory Usage: Slow increase in private bytes or working set.
- Event Logs: Windows Security or Application logs may show Schannel errors (Event ID 36888, 36874) if connections fail.
- Network Traffic: High number of short-lived TLS connections from a single source IP.
Detection Engineering
YARA Rule
rule CVE_2025_6338_Schannel_Leak
{
meta:
description = "Detects Qt Schannel handle leak indicators in process memory"
author = "Valters IT"
date = "2025-04-10"
hash = "unknown"
strings:
$s1 = "Schannel" ascii wide nocase
$s2 = "FreeCredentialsHandle" ascii wide
$s3 = "DeleteSecurityContext" ascii wide
$s4 = "QSslSocketBackendSchannel" ascii wide
condition:
$s1 and $s4 and not ($s2 or $s3)
}
Sigma Rule
title: CVE-2025-6338 Qt Schannel Handle Leak Detection
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects gradual handle count increase in Qt processes on Windows
author: Valters IT
logsource:
category: process_creation
product: windows
detection:
selection:
Image|endswith: '.exe'
CommandLine|contains: 'Qt'
condition: selection
timeframe: 1h
aggregation:
field: Image
function: count
condition: gt 1000
falsepositives:
- Legitimate high-connection services
level: medium
Suricata Rule
alert tcp $EXTERNAL_NET any -> $HOME_NET 443 (msg:"CVE-2025-6338 Qt Schannel DoS Attempt"; flow:to_server; content:"|16 03|"; depth:2; threshold:type both, track by_src, count 100, seconds 60; classtype:attempted-dos; sid:1000001; rev:1;)
Remediation & Mitigation
- Patch: Upgrade to Qt 6.9.2 or later. For Qt 5.15.x, apply the vendor patch when available.
- Workaround: Disable Schannel and use OpenSSL backend if possible (set
QT_SSL_BACKEND=openssl). - Rate Limiting: Implement connection rate limiting at the application or network level.
- Monitoring: Set up alerts for handle count anomalies in Qt processes.
- Resource Limits: Use Windows Job Objects to limit handle count per process.
Valters IT
DevSecOps & Cyber Threat Intelligence