Mar 6, 2026·5 min read·44 visits
CoreDNS < 1.14.2 evaluates ACLs before rewriting query names. Attackers can query an allowed domain that rewrites to a restricted internal domain, bypassing security controls.
A logical vulnerability in CoreDNS versions prior to 1.14.2 allows attackers to bypass access control lists (ACLs) via a Time-of-Check Time-of-Use (TOCTOU) flaw. The default plugin execution order processes security enforcement plugins (such as `acl`, `firewall`, and `opa`) before the `rewrite` plugin. Consequently, an attacker can query a permitted domain name that is subsequently rewritten to a restricted internal domain, bypassing the intended security policies and resolving the restricted target.
CoreDNS is a modular DNS server widely used in cloud-native environments, particularly Kubernetes, where it serves as the cluster DNS provider. Its architecture relies on a chain of plugins (middleware) to process DNS queries sequentially. Each plugin inspects, modifies, or answers the query before passing it to the next plugin in the chain. The execution order is statically defined at compile time via a plugin.cfg file.
In versions prior to 1.14.2, the default configuration placed security enforcement plugins—specifically acl, firewall, and opa—earlier in the execution chain than the rewrite plugin. This ordering created a logical flaw: the authorization decision was based on the initial query name (Time-of-Check), while the actual resolution occurred on a modified query name (Time-of-Use) after the rewrite plugin had altered the request.
This discrepancy allows an attacker to exploit the rewrite rules to access restricted records. By crafting a DNS query for a domain that is permitted by the ACL but explicitly rewritten to a restricted domain (e.g., an internal service or sensitive infrastructure), the attacker can successfully resolve the restricted target, effectively bypassing the access control layer.
The root cause is a Time-of-Check Time-of-Use (TOCTOU) race condition (CWE-367) inherent in the static plugin ordering defined in plugin.cfg. In CoreDNS, the order of lines in plugin.cfg dictates the order of Handler registration in the compiled binary. The vulnerable configuration prioritized acl over rewrite.
The processing pipeline functioned as follows:
acl plugin receives the dns.Msg structure. It inspects the Question section (QNAME) against its configured rules. If the QNAME matches an allow list (or fails to match a block list), the plugin calls next.ServeDNS() to pass control down the chain.rewrite plugin receives the request. It matches the QNAME against rewrite rules. If a match is found, it modifies the QNAME in place within the dns.Msg structure (e.g., changing public-proxy.example.com to admin-panel.internal).kubernetes, etcd, or file) receive the modified request. They resolve the new QNAME (admin-panel.internal) and return the IP address.Because the acl plugin does not re-verify the request after it returns from the chain (or before the backend resolves it), the security context established at step 1 is invalid for the parameters used at step 3. The system effectively authorizes the alias but resolves the target.
The vulnerability is not a syntax error in Go code but a semantic error in the build configuration plugin.cfg. Below is a conceptual comparison of the vulnerable vs. fixed execution order.
Vulnerable Configuration (Conceptual)
The acl plugin runs before rewrite. The query passes the security check before it is transformed.
# plugin.cfg (Vulnerable)
# Security plugins execute first
acl:acl
firewall:firewall
# ... intermediary plugins ...
# Mutation plugins execute later
rewrite:rewrite
# Backend resolution
kubernetes:kubernetes
file:fileFixed Configuration (CoreDNS v1.14.2)
The fix involves moving rewrite (and other normalization plugins like template) before the security plugins. This ensures that the ACL checks are applied to the final, normalized state of the query.
# plugin.cfg (Fixed)
# Mutation/Normalization executes first
rewrite:rewrite
# Security plugins execute on the transformed query
acl:acl
firewall:firewall
# Backend resolution
kubernetes:kubernetes
file:fileThis reordering ensures that if rewrite changes public.com to private.internal, the acl plugin sees private.internal and correctly blocks the request based on the policy for the internal domain.
An attacker can exploit this vulnerability in environments where CoreDNS is configured with both ACLs (to restrict access to internal names) and Rewrites (to map external aliases to internal names). Consider a Kubernetes cluster where *.internal is restricted to authorized pods, but proxy.example.com is publicly resolvable and rewrites to db.internal.
Attack Steps:
DIG @target-server proxy.example.comproxy.example.com. The ACL allows this public domain. Code: Allowed.proxy.example.com → db.internal.kubernetes plugin looks up db.internal and finds the ClusterIP 10.96.0.50.The impact of this vulnerability is significant in multi-tenant or segmented network environments utilizing CoreDNS for service discovery.
Security Implications:
admin.* services), this bypass renders those controls ineffective against aliased domains.Severity Metrics:
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N| Product | Affected Versions | Fixed Version |
|---|---|---|
CoreDNS CoreDNS | < 1.14.2 | 1.14.2 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-367 (TOCTOU) |
| Attack Vector | Network |
| CVSS v3.1 | 7.7 (High) |
| Impact | ACL Bypass / Information Disclosure |
| Exploit Status | No Active Exploitation |
| Fixed Version | 1.14.2 |
Code16 Sharp versions from 9.0.0 up to (but not including) 9.22.3 are vulnerable to a missing authorization flaw in the Quick Creation Command feature. The ApiEntityListQuickCreationCommandController fails to validate entity-level 'create' policies before returning administrative form designs or processing database modifications. Authenticated users with restricted access can bypass policy boundaries to access creation configurations and insert records.
CVE-2026-49471 is a high-severity security vulnerability in Serena, an AI-assisted coding Model Context Protocol (MCP) toolkit. In versions prior to v1.5.2, Serena's built-in web dashboard exposes an unauthenticated Flask API on a predictable port. Lacking host validation and CSRF protections, this endpoint is vulnerable to DNS Rebinding. An attacker can lure a user to a malicious webpage, bypass the Same-Origin Policy (SOP), rewrite the AI agent's persistent memory, and execute arbitrary commands on the host operating system via the autonomous agent's shell execution engine.
The trapster honeypot package is vulnerable to a remote denial of service (DoS) vulnerability due to uncontrolled recursion during the parsing of malformed DNS compression pointers in the decode_labels function.
A critical Use-After-Free (UAF) memory corruption vulnerability exists in the oneringbuf Rust crate prior to version 0.8.0. The vulnerability allows safe Rust code to instantiate and clone reference wrappers that point to heap-allocated ring buffers. Dropping one wrapper prematurely reclaims the backing memory, leading to dangling pointer references and subsequent Use-After-Free or Double Free states.
Januscape (CVE-2026-53359) is a critical Use-After-Free vulnerability in the x86 Shadow MMU component of the Linux Kernel's KVM subsystem. A logic error in shadow page tracking permits unauthorized page reuse without validating architectural execution roles, leading to dangling pointers in reverse mapping (rmap) tracking entries during guest memory teardown.
CVE-2026-48282 is a critical unauthenticated path traversal and arbitrary file write vulnerability in the Remote Development Services (RDS) component of Adobe ColdFusion. The vulnerability allows a remote, unauthenticated attacker to bypass directory boundaries and write arbitrary files, including CFML-based web shells, onto the host server. This flaw is actively exploited in the wild and enables full unauthenticated remote code execution under the privileges of the ColdFusion service account.