Summary
CoreDNS versions prior to 1.14.3 contain an authorization flaw in the transfer plugin's zone-selection logic, where a lexicographic comparison is used instead of a true longest-suffix match.
In configurations with both parent and more-specific subzones, this can cause a permissive parent-zone ACL to override a restrictive subzone ACL, allowing unauthorized remote clients to perform AXFR/IXFR and retrieve full DNS zone contents for the subzone.
Affected context
This vulnerability affects CoreDNS deployments that:
- Use the
transferplugin to control AXFR/IXFR access, and - Configure both a parent DNS zone and one or more more-specific subzones in the same server, and
- Rely on access control lists (ACLs) where the parent zone is more permissive than the subzone.
Under these conditions, the transfer plugin's zone matching logic may pick the wrong zone ACL based on lexicographic ordering instead of the most specific suffix, weakening access control for subzones.
Exploit preconditions
- Attack surface: Remote DNS (TCP/UDP) interface exposed by CoreDNS for zone transfers.
- Required access: Ability to connect as a DNS client that can send AXFR/IXFR requests to the CoreDNS instance (no prior authentication at the application layer).
- Configuration conditions:
- The
transferplugin is enabled and used for access control. - Both parent and subzone are configured (e.g.,
example.org.anda.example.org.). - Parent zone has a more permissive transfer rule than the subzone.
- Trigger point: A crafted AXFR or IXFR request targeting the subzone is sent to the server.
- Why exploitation is possible: The
longestMatch()function compares zone names lexicographically rather than by longest-suffix match, so the "winning" zone ACL may come from the parent zone when string ordering places it after the subzone, resulting in unintended authorization for the subzone transfer.
Why this happens
The underlying issue is an authorization decision based on incorrect policy selection logic, aligning with CWE-863: Incorrect Authorization.
Instead of determining the most specific matching zone by evaluating the longest DNS name suffix (i.e., selecting the subzone when present), the CoreDNS transfer plugin uses a lexicographic string comparison to pick the "largest" zone name.
In certain name combinations, a parent zone compares as "greater" than a subzone string, so the parent's ACL is applied to subzone transfer requests.
This causes the effective policy to be broader than intended, undermining the principle of specificity in access control rules.
Potential impact
- Unauthorized AXFR or IXFR of sensitive subzones.
- Disclosure of full DNS zone contents, including:
- Internal hostnames.
- Service names and infrastructure topology.
- Potentially environment-specific records revealing technologies and roles.
- Enhanced reconnaissance capability for attackers, enabling more targeted attacks (phishing, lateral movement, service impersonation).
- Indirect exposure of internal network structure or security controls inferred from naming conventions.
General mitigation guidance
Effective mitigation centers on hardening both the authorization model and the zone transfer exposure:
- Prefer a design where subzones do not rely on more permissive parent ACLs; define explicit, least-privilege transfer policies for each zone.
- Treat zone transfer authorization as a strict, per-zone control and avoid configurations where parent zones are broadly permissive while subzones are restrictive.
- Limit AXFR/IXFR endpoints to trusted IP ranges or dedicated transfer channels at the network layer (e.g., firewall rules, private peering).
- Use defense-in-depth by combining DNS ACLs with upstream network controls (VPNs, management networks, IP allowlists) for all zone transfer paths.
- Regularly review zone configuration files for policy conflicts, especially where overlapping parent/subzone definitions exist.
- Apply the principle of least privilege to DNS servers, ensuring they only serve authoritative data and transfer it to specifically designated secondaries.
How teams detect issues like this
Organizations can detect and monitor this class of issue using:
- Configuration review and linting:
- Automated checks that flag parent/subzone pairs where the parent is more permissive than the subzone for transfers.
- Rules that highlight overlapping zones using shared transfer ACLs or unexpected inheritance patterns.
- Static analysis of logic (for downstream forks or custom plugins):
- Searches for authorization decisions that rely on lexicographic or naive string comparison instead of semantic DNS name matching.
- Patterns where policy selection is based on "max"/"min" comparisons over resource identifiers rather than specificity.
- Runtime monitoring and logging:
- Enable detailed transfer logging and alert on AXFR/IXFR responses to untrusted or unexpected client IPs.
- Periodic synthetic tests attempting zone transfers from monitoring endpoints to validate enforcement behavior.
- Policy enforcement in CI/CD:
- Integrate config-scanning tools into deployment pipelines to stop changes that introduce conflicting parent/subzone ACLs.

