The Harder You Try, The Harder You Fail: The KeyTrap Denial-of-Service Algorithmic Complexity Attacks on DNSSEC
Elias Heftrig, Haya Schulmann, Niklas Vogel, Michael Waidner
Abstract
Availability is a major concern in the design of DNSSEC. To ensure availability, DNSSEC follows Postel's Law [RFC1123]: "Be liberal in what you accept, and conservative in what you send. " Hence, nameservers should send not just one matching key for a record set, but all the relevant cryptographic material, e.g., all the keys for all the ciphers that they support and all the corresponding signatures. This ensures that validation succeeds, and hence availability, even if some of the DNSSEC keys are misconfigured, incorrect or correspond to unsupported ciphers. We show that this design of DNSSEC is flawed. Exploiting vulnerable recommendations in the DNSSEC standards, we develop a new class of DNSSEC-based algorithmic complexity attacks on DNS, we dub KeyTrap attacks. All popular DNS implementations and services are vulnerable. With just a single DNS packet, the KeyTrap attacks lead to a 2.000.000x spike in CPU instruction count in vulnerable DNS resolvers, stalling some for as long as 16 hours. This devastating effect prompted major DNS vendors to refer to KeyTrap as "the worst attack on DNS ever discovered". Exploiting KeyTrap, an attacker could effectively disable Internet access in any system utilizing a DNSSEC-validating resolver. We disclosed KeyTrap to vendors and operators on November 2, 2023, confidentially reporting the vulnerabilities to a closed group of DNS experts, operators and developers from the industry. Since then we have been working with all major vendors to mitigate KeyTrap, repeatedly discovering and assisting in closing weaknesses in proposed patches. Following our disclosure, the industry-wide umbrella CVE-2023-50387 has been assigned, covering the DNSSEC protocol vulnerabilities we present in this work.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
5 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Your Shield is My Sword: A Persistent Denial-of-Service Attack via the Reuse of Unvalidated Caches in DNSSEC Validation cites Downgrading DNSSEC: How to Exploit Crypto Agility for Hijacking Signed Zones
- Resolve the Unresolved: Systematic Work Profiling for DNS Resolvers cites NXNSAttack: Recursive DNS Inefficiencies and Vulnerabilities
- NRDelegationAttack: Complexity DDoS attack on DNS Recursive Resolvers cites NXNSAttack: Recursive DNS Inefficiencies and Vulnerabilities
Cited by top-tier papers5
- Your Shield is My Sword: A Persistent Denial-of-Service Attack via the Reuse of Unvalidated Caches in DNSSEC ValidationShuhan Zhang, Shuai Wang, Li Chen, Dan Li et al.USENIX Security 2025
- Resolve the Unresolved: Systematic Work Profiling for DNS ResolversLiwen Xu, Huayi Duan, Zechao Cai, Adrian PerrigS&P 2026
- DNS FLaRE: A Flush-Reload Attack on DNS ForwardersGilad Moav, Yehuda Afek, Anat Bremler-Barr, Amit KleinUSENIX Security 2025
- Exploring and Analyzing Cross Layer DoS Attack Against UDP-based Services on LinuxDashuai Wu, Yunyi Zhang, Baojun Liu, Xiang Li et al.CCS 2025
- Batch Me If You Can: Coverage-Guided RPKI Fuzzing at ScaleHaya Schulmann, Niklas VogelS&P 2026
Builds on4
- SurgeProtector: mitigating temporal algorithmic complexity attacks using adversarial schedulingNirav Atre, Hugo Sadok, Erica Chiang, Weina Wang et al.SIGCOMM 2022 · 12 citations
- Downgrading DNSSEC: How to Exploit Crypto Agility for Hijacking Signed ZonesElias Heftrig, Haya Schulmann, Michael WaidnerUSENIX Security 2023
- NXNSAttack: Recursive DNS Inefficiencies and VulnerabilitiesYehuda Afek, Anat Bremler-Barr, Lior ShafirUSENIX Security 2020
- NRDelegationAttack: Complexity DDoS attack on DNS Recursive ResolversYehuda Afek, Anat Bremler-Barr, Shani StajnrodUSENIX Security 2023
Related papers
- Good Cache, BAD Cache: Exploiting DNSSEC Validation Failures for DNS Cache Poisoning AttacksShiming Liu, Yunyi Zhang, Chaoyi Lu, Baojun Liu et al.CCS 2026
- DNSBomb: A New Practical-and-Powerful Pulsing DoS Attack Exploiting DNS Queries-and-ResponsesXiang Li, Dashuai Wu, Haixin Duan, Qi LiS&P 2024 · 14 citations
- X.509DoS: Exploiting and Detecting Denial-of-Service Vulnerabilities in Cryptographic Libraries using Crafted X.509 CertificatesBing Shi, Wenchao Li, Yuchen Wang, Xiaolong Bai et al.USENIX Security 2025
- The Maginot Line: Attacking the Boundary of DNS Caching ProtectionXiang Li, Chaoyi Lu, Baojun Liu, Qifan Zhang et al.USENIX Security 2023
- TuDoor Attack: Systematically Exploring and Exploiting Logic Vulnerabilities in DNS Response Pre-processing with Malformed PacketsXiang Li, Wei Xu, Baojun Liu, Mingming Zhang et al.S&P 2024 · 20 citations
