Skip to content

plugin: reorder rewrite before acl to prevent bypass#7882

Merged
yongtang merged 1 commit into
coredns:masterfrom
YOUNEVSKY:fix/plugin-ordering
Feb 25, 2026
Merged

plugin: reorder rewrite before acl to prevent bypass#7882
yongtang merged 1 commit into
coredns:masterfrom
YOUNEVSKY:fix/plugin-ordering

Conversation

@YOUNEVSKY

Copy link
Copy Markdown
Contributor

1. Why is this pull request needed and what does it do?

In the default plugin.cfg, the acl plugin (and other security/policy plugins) are ordered before the rewrite plugin. This creates a Time-of-Check Time-of-Use (TOCTOU) vulnerability where an access control check is performed on the original query name, but the query is subsequently rewritten to a restricted internal domain (e.g., in a Kubernetes multi-tenant cluster) and resolved by the backend.

2. Which issues (if any) are related?

Relates to GitHub Security Advisory: GHSA-c9v3-4pv7-87pr

3. Which documentation changes (if any) need to be made?

None

4. Does this introduce a backward incompatible change or deprecation?

Yes and No. It changes the execution order of plugins. Users who implicitly relied on acl blocking a query before a rewrite rule applied to it will now have the rewrite applied first. This is the logically secure flow, but represents a behavior change in the pipeline order.

Signed-off-by: younevsky <younevsky@gmail.com>
@yongtang yongtang merged commit 4411cff into coredns:master Feb 25, 2026
11 checks passed
yongtang pushed a commit to yongtang/coredns that referenced this pull request Mar 18, 2026
gerrit-photon pushed a commit to vmware/photon that referenced this pull request Mar 23, 2026
Change-Id: I0a4bcd447216757022b9487045000c316a1d709a
CVE-2026-26017: coredns/coredns#7882
CVE-2026-26018: coredns/coredns#7881
Reviewed-on: http://photon-gerrit.lvn.broadcom.net/c/photon/+/27255
Tested-by: gerrit-photon <svc.photon-ci@broadcom.com>
Reviewed-by: <mukul.sikka@broadcom.com>
Reviewed-by: Harinadh Dommaraju <harinadh.dommaraju@broadcom.com>
gerrit-photon pushed a commit to vmware/photon that referenced this pull request Mar 23, 2026
Change-Id: I6f6e47a9e218e1daaf9b976425929782469bd7f8
CVE-2026-26017: coredns/coredns#7882
CVE-2026-26018: coredns/coredns#7881
Reviewed-on: http://photon-gerrit.lvn.broadcom.net/c/photon/+/27254
Reviewed-by: <mukul.sikka@broadcom.com>
Tested-by: gerrit-photon <svc.photon-ci@broadcom.com>
Reviewed-by: Harinadh Dommaraju <harinadh.dommaraju@broadcom.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants