CVE-2026-33307 Overview
CVE-2026-33307 is a stack-based buffer overflow vulnerability in mod_gnutls, a TLS module for Apache HTTPD based on GnuTLS. The vulnerability exists in the client certificate verification code, which imports the certificate chain sent by the client into a fixed-size gnutls_x509_crt_t x509[] array without validating that the number of certificates does not exceed the array size. While no attacker-controlled data is written directly into the stack buffer (since gnutls_x509_crt_t is a typedef for a pointer to an opaque GnuTLS structure), writing a pointer beyond the last array element can trigger a segmentation fault and potentially cause stack corruption.
Critical Impact
Attackers can remotely cause denial of service by sending malformed certificate chains to servers with client certificate verification enabled.
Affected Products
- mod_gnutls versions prior to 0.12.3
- mod_gnutls versions prior to 0.13.0
- Apache HTTPD servers with GnuTLSClientVerify configured (not using the default ignore setting)
Discovery Timeline
- 2026-03-24 - CVE CVE-2026-33307 published to NVD
- 2026-03-24 - Last updated in NVD database
Technical Details for CVE-2026-33307
Vulnerability Analysis
This vulnerability is classified under CWE-121 (Stack-based Buffer Overflow). The flaw occurs during client certificate verification where the code imports certificates from a client-provided chain into a statically-sized array. The absence of bounds checking allows an attacker to send a certificate chain that exceeds the buffer capacity. Although the overflow writes only internal GnuTLS structure pointers (created via gnutls_x509_crt_init()) rather than attacker-controlled data, this still results in memory corruption that typically manifests as a segmentation fault, causing the Apache worker process to crash.
Server configurations using the default GnuTLSClientVerify ignore setting are not affected, as client certificate processing is bypassed entirely in this mode.
Root Cause
The root cause is insufficient input validation in the certificate chain processing logic. The code assumes the client will send a certificate chain within expected bounds but fails to enforce this assumption before importing certificates into the fixed-size array. This missing bounds check allows an oversized certificate chain to write beyond the allocated stack buffer.
Attack Vector
This vulnerability is exploitable over the network without requiring authentication or user interaction. An attacker can craft a TLS client hello message with a certificate chain containing more certificates than the server's buffer can accommodate. When the server attempts to verify the client certificate, it will iterate through the chain and write pointers beyond the array boundary, leading to a crash. Repeated exploitation can result in sustained denial of service against the affected server.
"GnuTLS: Failed to Verify Peer: "
"Client did not submit a certificate");
return HTTP_FORBIDDEN;
+ } else if (cert_list_size > MAX_CHAIN_SIZE) {
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
+ "Client sent certificate chain with length %u, "
+ "maximum supported length is %u",
+ cert_list_size, MAX_CHAIN_SIZE);
+ return HTTP_FORBIDDEN;
}
if (gnutls_certificate_type_get(ctxt->session) == GNUTLS_CRT_X509) {
Source: GitHub Commit Details
Detection Methods for CVE-2026-33307
Indicators of Compromise
- Unexpected Apache HTTPD worker process crashes or restarts
- Segmentation faults logged in system error logs correlated with TLS handshakes
- Abnormal TLS client certificate negotiation attempts with unusually long certificate chains
- Increased memory errors in Apache error logs related to mod_gnutls
Detection Strategies
- Monitor Apache error logs for repeated segmentation faults or crash messages from mod_gnutls
- Implement network monitoring to detect TLS handshakes with abnormally large certificate chains
- Deploy intrusion detection rules to identify client certificate chains exceeding typical lengths
- Use application performance monitoring to track Apache worker process stability
Monitoring Recommendations
- Enable verbose logging for mod_gnutls to capture certificate verification events
- Configure alerting for Apache child process termination patterns indicative of crashes
- Monitor TLS connection metrics for anomalous certificate chain sizes
- Review system logs for SIGSEGV signals originating from Apache processes
How to Mitigate CVE-2026-33307
Immediate Actions Required
- Upgrade mod_gnutls to version 0.12.3 or 0.13.0 immediately
- If client certificate verification is not required, ensure GnuTLSClientVerify ignore (the default) is explicitly set
- Audit server configurations to identify systems using non-default GnuTLSClientVerify settings
- Consider temporarily disabling client certificate verification until patches can be applied
Patch Information
The vulnerability has been addressed in mod_gnutls version 0.12.3 and version 0.13.0. Version 0.12.3 adds explicit bounds checking to reject certificate chains exceeding the buffer length, returning HTTP_FORBIDDEN when the chain is too long. Version 0.13.0 takes a more comprehensive approach by rewriting certificate verification to use gnutls_certificate_verify_peers(), which eliminates the need for the fixed-size buffer entirely. Users on the 0.12.x branch who cannot immediately upgrade to 0.13.0 should apply version 0.12.3 as a minimal fix.
For detailed patch information, see the GitHub Security Advisory and the fix commit.
Workarounds
- No workaround is available according to the vendor advisory
- Servers using GnuTLSClientVerify ignore (the default configuration) are not affected
- If client certificate verification can be temporarily disabled, set GnuTLSClientVerify ignore until patching is possible
- Implement network-level filtering to limit certificate chain sizes if your infrastructure supports it
# Verify current mod_gnutls version
apachectl -M | grep gnutls
# Check for GnuTLSClientVerify settings in Apache configuration
grep -r "GnuTLSClientVerify" /etc/apache2/ /etc/httpd/
# Temporarily disable client certificate verification (if acceptable)
# Set in your mod_gnutls configuration:
# GnuTLSClientVerify ignore
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.


