CVE-2023-28320 Overview
A denial of service vulnerability exists in curl versions prior to v8.1.0 due to unsafe handling of a global buffer in the synchronous DNS resolver implementation. When libcurl is built to use the synchronous resolver backend, it employs alarm() and siglongjmp() to implement timeouts for slow name resolution operations. However, the global buffer used during this process lacks mutex protection, creating a race condition that can cause multi-threaded applications to crash or exhibit undefined behavior.
Critical Impact
Multi-threaded applications using libcurl with the synchronous resolver may experience application crashes or unpredictable behavior due to race conditions in unprotected global buffer access during DNS resolution timeouts.
Affected Products
- haxx curl (versions prior to 8.1.0)
- apple macos (multiple versions)
- netapp clustered_data_ontap
- netapp ontap_antivirus_connector
- netapp h300s_firmware
- netapp h500s_firmware
- netapp h700s_firmware
- netapp h410s_firmware
Discovery Timeline
- 2023-05-26 - CVE-2023-28320 published to NVD
- 2025-01-15 - Last updated in NVD database
Technical Details for CVE-2023-28320
Vulnerability Analysis
This vulnerability stems from a thread-safety issue in libcurl's synchronous DNS resolver implementation. The libcurl library supports multiple backend resolvers that can be selected at build time, including synchronous and asynchronous options. When the synchronous resolver is configured, libcurl implements a timeout mechanism for slow DNS lookups using POSIX signals (alarm() combined with siglongjmp()).
The core problem lies in the use of a global buffer during the signal-based timeout handling. In multi-threaded applications, multiple threads may attempt DNS resolution simultaneously. Without proper mutex protection around the global buffer, concurrent access from multiple threads creates a classic race condition scenario. This can lead to memory corruption, application crashes, or other undefined behavior when threads interfere with each other's resolver operations.
The vulnerability is classified under CWE-362 (Concurrent Execution using Shared Resource with Improper Synchronization) and CWE-400 (Uncontrolled Resource Consumption), reflecting both the race condition nature and its denial of service impact.
Root Cause
The root cause is the absence of mutex protection for a global buffer used by libcurl's synchronous resolver during signal-based timeout handling. When siglongjmp() is invoked to handle a timeout triggered by alarm(), the global buffer state may be accessed or modified by multiple threads simultaneously, violating thread-safety requirements. This architectural oversight only affects builds using the synchronous resolver backend, as asynchronous resolver implementations handle concurrency differently.
Attack Vector
The vulnerability can be exploited through network-based interactions that trigger DNS resolution in multi-threaded applications. An attacker could craft scenarios that cause prolonged DNS lookups, increasing the likelihood of timeout conditions occurring across multiple threads simultaneously. The network attack vector requires the attacker to influence DNS resolution timing, which could be achieved through:
- Slow or unresponsive DNS servers
- Network latency manipulation
- DNS server responses that trigger edge cases in resolver handling
The exploitation does not require user interaction or special privileges, though the attack complexity is considered high as successful exploitation depends on precise timing of concurrent operations.
Detection Methods for CVE-2023-28320
Indicators of Compromise
- Unexpected application crashes in multi-threaded services using libcurl for HTTP operations
- Core dumps showing crashes in DNS resolver-related functions within libcurl
- Intermittent service availability issues correlated with DNS resolution activity
- Memory corruption signatures in crash reports pointing to resolver buffer operations
Detection Strategies
- Monitor application logs for crash patterns associated with DNS timeout handling
- Implement crash dump analysis to identify libcurl resolver-related stack traces
- Deploy application stability monitoring to detect intermittent crashes in curl-dependent services
- Audit build configurations to identify systems using libcurl's synchronous resolver backend
Monitoring Recommendations
- Enable enhanced logging for DNS resolution operations in affected applications
- Monitor system stability metrics for services dependent on libcurl
- Track application restart frequency as an indicator of potential exploitation attempts
- Review network traffic patterns for anomalous DNS resolution behavior
How to Mitigate CVE-2023-28320
Immediate Actions Required
- Upgrade curl/libcurl to version 8.1.0 or later on all affected systems
- Apply vendor-specific patches from Apple, NetApp, and other affected vendors
- Review build configurations to identify systems using the synchronous resolver backend
- Consider rebuilding libcurl with an asynchronous resolver backend as an interim measure
Patch Information
The vulnerability has been addressed in curl version 8.1.0 and later. Multiple vendors have released security updates to address this issue:
- Apple: Security updates HT213843, HT213844, and HT213845 for macOS
- NetApp: Advisory NTAP-20230609-0009 for Clustered Data ONTAP and related products
- Gentoo: GLSA 202310-12 security advisory
The original vulnerability report is available on HackerOne Report #1929597.
Workarounds
- Rebuild libcurl using an asynchronous resolver backend (c-ares or threaded resolver) instead of the synchronous resolver
- Implement application-level DNS caching to reduce resolver invocations
- Limit concurrent DNS resolution operations through application-level rate limiting
- Deploy process isolation to contain potential crashes and prevent service-wide outages
# Configuration example - Check current curl build configuration
curl --version
# Look for resolver information in the Features line
# Rebuild curl with c-ares for async resolver support
./configure --enable-ares
make
make install
# Verify the new configuration includes c-ares
curl --version | grep -i "AsynchDNS"
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

