CVE-2026-33598 Overview
CVE-2026-33598 is an out-of-bounds read vulnerability affecting DNSdist when processing cached crafted responses. The vulnerability is triggered when custom Lua code invokes either the getDomainListByAddress() or getAddressListByDomain() functions on a packet cache containing maliciously crafted data. This memory access violation could lead to information disclosure or service disruption.
Critical Impact
Attackers capable of injecting crafted responses into the DNSdist packet cache can trigger an out-of-bounds memory read, potentially exposing sensitive memory contents or causing denial of service conditions.
Affected Products
- DNSdist (versions unspecified - see DNSdist Security Advisory 2026-04)
Discovery Timeline
- 2026-04-22 - CVE CVE-2026-33598 published to NVD
- 2026-04-22 - Last updated in NVD database
Technical Details for CVE-2026-33598
Vulnerability Analysis
This vulnerability falls under CWE-125 (Out-of-Bounds Read), a memory corruption flaw where the application reads data beyond the boundaries of an allocated buffer. In the context of DNSdist, the issue manifests when custom Lua scripts interact with the packet cache using specific API functions.
When a crafted DNS response is cached and subsequently accessed via getDomainListByAddress() or getAddressListByDomain() Lua functions, the parsing logic fails to properly validate the bounds of the cached data. This allows an attacker to force the application to read memory locations outside the intended buffer, which may contain sensitive information or cause the process to crash.
The network-based attack vector requires the attacker to successfully inject a malformed response into the cache, which adds complexity to exploitation. Additionally, the vulnerability specifically requires that custom Lua code utilizing these particular functions is deployed, limiting the attack surface to DNSdist installations with such configurations.
Root Cause
The root cause of this vulnerability lies in improper bounds checking when parsing cached DNS response data within the getDomainListByAddress() and getAddressListByDomain() Lua API functions. When these functions process a maliciously crafted cached response, they fail to validate that all accessed memory offsets fall within the allocated buffer boundaries, resulting in an out-of-bounds read condition.
Attack Vector
The attack requires network access to exploit. An attacker must first be able to inject a specially crafted DNS response into the DNSdist packet cache. This could be achieved through cache poisoning techniques or by controlling an upstream DNS server. Once the malicious response is cached, the vulnerability is triggered when custom Lua code invokes the affected functions to process the cached entry.
The exploitation mechanism involves crafting a DNS response with carefully constructed data that causes the Lua API functions to miscalculate buffer boundaries during parsing. When these functions attempt to extract domain or address information, they read beyond the allocated memory region.
For technical implementation details and proof-of-concept information, refer to the DNSdist Security Advisory 2026-04.
Detection Methods for CVE-2026-33598
Indicators of Compromise
- Unexpected DNSdist process crashes or restarts, particularly when processing cached DNS responses
- Memory access violations or segmentation faults in DNSdist logs related to Lua script execution
- Anomalous DNS responses in cache with malformed or unexpected data structures
Detection Strategies
- Monitor DNSdist logs for segmentation faults or memory-related errors during Lua script execution
- Implement network traffic analysis to detect malformed DNS responses targeting DNSdist instances
- Deploy memory integrity monitoring tools to detect out-of-bounds access attempts
- Audit Lua scripts for usage of getDomainListByAddress() or getAddressListByDomain() functions
Monitoring Recommendations
- Enable verbose logging for Lua script execution in DNSdist to capture detailed error information
- Set up alerting for unexpected DNSdist process terminations or restarts
- Monitor system-level memory access patterns for anomalous behavior in the DNSdist process
How to Mitigate CVE-2026-33598
Immediate Actions Required
- Review all deployed Lua scripts for usage of getDomainListByAddress() or getAddressListByDomain() functions
- Consider temporarily disabling or modifying Lua scripts that utilize the affected functions until patches are applied
- Apply the latest security patches from PowerDNS as soon as they become available
Patch Information
PowerDNS has released a security advisory addressing this vulnerability. System administrators should consult the DNSdist Security Advisory 2026-04 for detailed patch information and updated software versions. Apply the recommended patches following your organization's change management procedures.
Workarounds
- Remove or disable custom Lua scripts that call getDomainListByAddress() or getAddressListByDomain() functions until patched versions are deployed
- Implement strict input validation on upstream DNS responses before caching
- Consider deploying network-level filtering to detect and block anomalous DNS responses
- Restrict access to DNSdist management interfaces and limit who can deploy custom Lua scripts
# Review Lua script configuration for affected functions
grep -r "getDomainListByAddress\|getAddressListByDomain" /etc/dnsdist/
# Consider disabling problematic Lua scripts temporarily
# mv /etc/dnsdist/custom-lookup.lua /etc/dnsdist/custom-lookup.lua.disabled
# systemctl restart dnsdist
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.


