CoreDNS: CVE-2026-32936 · jq: CVE-2026-43895
At what point does a program lose the ability to enforce its own security policy?
I have been interested in this question since investigating the request conversion path in CoreDNS and the import machinery in jq. In both cases the functions involved were capable of doing exactly what their interfaces promised. The failure was in the assumptions made when those functions were composed.
A DNS server can reject a request after spending resources on it. An interpreter can validate a name after discarding part of it. The first result says nothing about how much work preceded it. The second says nothing about the bytes that no longer exist in the representation being checked.
Where would I place a fix? Before answering that I need to know two things. What operation must the program prevent? What is the last state from which it can still prevent that operation without rejecting legitimate input?
Those are different questions. One concerns control over execution. The other concerns knowledge of the input. Much of the difficulty in these two disclosures follows from the fact that the answers are not necessarily available at the same point in the program.
1. The state that makes a decision possible
Consider an implementation that performs an operation only after a predicate returns true. At first sight this looks like a complete security argument. But the predicate has a domain and the operation has effects. The argument is incomplete unless the domain of the predicate corresponds to the object consumed by the operation and the predicate precedes the protected effect.
I prefer to start at the effect and work backwards. Suppose the program has three transitions:
S0 ── T0 ──> S1 ── T1 ──> S2 ── T2 ──> S3
If T1 is a resource-consuming operation then a decision at S2 cannot prevent its execution. If T1 discards a distinction needed by the policy then a predicate at S2 might not even be able to make the correct decision. Both problems remain even if every function returns a correct result according to its local specification.
Two constraints govern the placement of a guard. A third is implicit in any useful system:
- Information. The observation available to the guard must distinguish inputs that require different policy decisions.
- Intervention. The guard must be able to stop the relevant effect before the property has already been violated.
- Legitimate behavior. The mechanism must preserve legitimate behavior.
Rejecting everything trivially prevents most bad effects. It is not a transparent implementation of a policy that admits some inputs.
Figure 1. A guard is useful only within the part of execution where its evidence exists and its decision still has authority. The direct route is unguarded. The route through the decision mediates that transition.
This is not an attempt to rename complete mediation. The principle is well established. The useful exercise is to make its requirements explicit in a codebase where there is no obvious access-control API. Resource conversion and representation conversion look like ordinary plumbing. Yet those are precisely the operations whose effects the two security contracts need to constrain.
2. CoreDNS: what does a rejection actually guarantee?
CVE-2026-32936 · EUVD-2026-27442 · GO-2026-5164
The useful starting point for this investigation was the distinction between DNS-over-HTTPS transport methods. GET conveys an encoded DNS message through the URL. POST conveys a wire-format message through the body. They converge on the same application-level operation but enter it through different representations.
Why is this worth examining? Because an implementation can preserve protocol semantics while changing the amount of authority a remote client has over the work required to interpret a message. Two entry points can accept equivalent messages without having equivalent resource guarantees.
The relevant path is RequestToMsg in plugin/pkg/doh/doh.go. The affected GET branch extracts the query value and enters base64ToMsg. The latter converts the input before the DNS parser determines whether it is a valid message. The modern POST path already places a bound on its body read. The upstream advisory documents the resulting pre-validation resource consumption and its availability impact.
The code does not need to accept malformed DNS data for the security property to fail. It only needs to perform the work that the property was supposed to prevent.
2.1 Identify the first effect rather than the last error
I would separate three quantities when reading this path:
- The bytes accepted by the HTTP implementation.
- The work needed to extract the query value.
- The work needed to convert that value into a DNS message.
These quantities are related. They are not interchangeable. An HTTP envelope limit establishes something about the transport. It does not establish that the application has imposed the right admission budget for DNS conversion. Conversely an application-level guard cannot account retroactively for work already performed by the HTTP implementation.
The security property at issue is narrower than an absolute bound on all memory used by CoreDNS. It concerns admission to the conversion stage. In particular a representation outside the permitted encoded size must not enter that stage.
The distinction matters because a resource budget is a property of an execution prefix. Once a certain amount of CPU work has occurred it cannot be unexecuted. Releasing a temporary allocation can reduce current heap occupancy but cannot erase allocation history or restore the time spent on it. Peak memory and cumulative allocation are also different quantities. None of them can be inferred from the final HTTP status alone.
Figure 2. The repair mediates the conversion boundary. It does not move the boundary ahead of the HTTP parser or query extraction.
2.2 Read the diff as a claim about control flow
The upstream patch introduces a comparison against maxBase64Len before base64ToMsg. It uses a common local limit of 65,536 bytes for the POST read and derives the corresponding unpadded Base64 length bound for GET. The fixed release is v1.14.3.
The guard is not a complete DNS validator and does not need to be one. Its purpose is to prove a necessary condition for entering the conversion path. Validating the internal DNS structure remains the responsibility of the parser.
The encoded limit is derived from the decoded limit. If B is the byte budget then canonical unpadded Base64 has length ceil(8B/6) at that boundary. This is an admission bound on the representation. It is not a claim that every sequence of characters under the bound is decodable or is valid DNS. Also note that the upstream constant is not numerically identical to the 65,535-byte DNS wire-message maximum in RFC 8484. I keep the implementation limit and the protocol limit separate when describing the repair.
A successful pass through the comparison dominates the protected call on this branch. That is the control-flow argument. The value whose length is checked must also be the value sent to the decoder. That is the dataflow argument. Neither argument by itself proves that every surrounding allocation is appropriately bounded.
For a small generic adapter the contract would look like this:
// Illustrative defensive interface. Not CoreDNS source.
func admittedSize(encodedSize int, budget int) bool {
return encodedSize >= 0 && encodedSize <= budget
}
// Only a value admitted by the size policy may enter conversion.
// Syntax validation remains a separate responsibility.
The upstream regression checks for the new size-specific error. That is stronger than asserting only that an error occurred. I would retain that test and add a stage-entry observation to the specification of the protected conversion: an out-of-domain value must not cause the protected decoder to run. The reason is not to demand instrumentation everywhere. It is to make clear which property a regression is supposed to falsify.
2.3 Can two implementations have identical outcomes but different security behavior?
I reused a bounded Go experiment from the laboratory evidence and ran it again for this article. It operates on local strings with a small artificial limit. There is no HTTP listener or DNS implementation. It compares two placements of an admission check using the standard-library converter. All test inputs have canonical encodings. The experiment records the returned verdict and entry into the conversion function.
| Observation | Result |
|---|---|
| Corpus size | 97 |
| Differences in accept/reject decisions | 0 |
| Differences in stage-entry / byte traces | 48 |
All 48 differences occur outside the artificial admission domain. The positive controls inside the domain produce the same results and traces. The output is preserved in go-rerun.txt in the evidence archive.
This experiment is not a performance benchmark of CoreDNS. It establishes a deficiency in a particular test oracle. The two implementations are indistinguishable if all we observe is acceptance. They become distinguishable once the observation includes the stage whose admission is under review.
There is a practical consequence for remediation testing. Testing only the final result can demonstrate that a decoder rejects an invalid representation while leaving the resource property entirely untested. A security regression must observe the part of execution in which the claimed guarantee could have failed.
The source analysis and the upstream regression establish the placement of the repair. A production resource limit also requires independent consideration of the HTTP layer and aggregate load. I have not measured those here and make no claim of a new vulnerability in the repaired release.
3. jq: an interface can erase the evidence of an invalid operation
CVE-2026-43895 · EUVD-2026-29173
The jq investigation began at a different layer. The interesting boundary is not the filesystem alone. It is the change in representation that occurs before import resolution.
jq has a string value model capable of preserving internal zero bytes. A NUL-terminated C-string interface has a different model. It determines the end of a string by finding the terminator rather than by consulting an explicit length.
This difference is not an error in C. The interface is a valid abstraction over its own domain. The mistake is using it as an intermediate representation for a value whose original domain is larger without first establishing representability.
Suppose a policy is expressed over logical import names. To claim that it governs the object consumed by the interpreter we need a correspondence between the name inspected by the policy and the name interpreted by the loader. That correspondence is a precondition of the security argument. The existence of both an external policy and an internal path validator does not establish it.
The upstream advisory describes a local automation and publishing context in which this correspondence fails. It is a conditional policy bypass. It is not a claim that jq provides general-purpose sandboxing or that every deployment has a vulnerable redaction policy.
3.1 Why does a path fix change a compiler interface?
The fix commit 9d223f1 is more informative than the error message it introduces.
Before the change gen_import accepted C strings. After the change it accepts jv values. Dependency metadata now retains the string value rather than reconstructing it from a terminator-delimited view. The linker can then compare the C-string length with the original byte length in validate_relpath.
A check at the linker alone would have been inadequate for a value already truncated during metadata construction. Once the name was reconstructed from the shortened view there was no longer evidence of the discarded suffix in that value. A later check could have verified the reconstructed name perfectly and still learned nothing about the original input.
This is a change to the evidence available at a decision point. The upstream change is not merely an additional predicate. It modifies the compiler’s dataflow so that the predicate has the information required to implement the intended admission policy.
Figure 3. Moving a guard is not enough when its input has already lost a policy-relevant distinction. The repair changes the representation carried across the compiler interface.
For a defensive C interface the representability condition can be expressed without relying on the terminator to determine the logical input length:
#include <stdbool.h>
#include <stddef.h>
#include <string.h>
/* Contract: p refers to n readable bytes. */
static bool c_string_representable(const char *p, size_t n)
{
return memchr(p, '\0', n) == NULL;
}
This is a narrow check. It says that the payload does not contain an internal terminator. It does not supply the required trailing terminator for the eventual consumer. It does not resolve filesystem aliases. It does not authorize a path or prove that a subsequent open refers to the same filesystem object. The caller still has those obligations.
The C model in the evidence archive enumerates a deliberately small byte domain and compares the result of this predicate with the length seen through a properly terminated C string. A separate local observation from the earlier investigation on jq-1.7 confirmed that the language-level value preserved its byte length while two import representations resolved to the same harmless marker. The absent-module control failed as expected. No external policy or sensitive files were involved in that local observation.
3.2 What if the linker could infer what the compiler discarded?
There is a precise answer to this question. It is independent of how cleverly the linker is implemented.
Let X be the domain of original values and let r : X -> Y be the representation passed to a validator. Let P be the intended binary policy over X. A validator that receives only r(x) can implement P exactly if and only if:
r(x) = r(y) implies P(x) = P(y)
Necessity follows because equal observations cannot produce different deterministic decisions. Sufficiency follows because every equivalence class induced by r then has a well-defined policy value.
The result does not require r to be injective over all inputs. It only requires the policy to be constant on each equivalence class. Erasing irrelevant data is legitimate. Erasing the distinction between a permitted value and a forbidden value makes exact enforcement impossible from that representation alone.
This is the important limitation of a post-conversion repair: the old representation may not be a sufficient statistic for the policy.
In the earlier finite partition experiment the domain contains all strings up to length five over a three-symbol alphabet. The policy admits strings without an internal zero. Re-running the model gave the following exact results:
| Finite-domain property | Count |
|---|---|
| Original values | 364 |
| Distinct projected views | 63 |
| Views shared by permitted and forbidden values | 31 |
| Minimum classification errors using only the projection | 31 |
| Errors with the original representation available | 0 |
The minimum-error result counts all original values equally. It is not an estimate of an attack probability. It tells us that on this specific domain every projection-only classifier must choose incorrectly at least once in each mixed equivalence class. A fail-closed classifier can avoid false acceptance by denying such classes entirely. It cannot do so while admitting all legitimate members of those classes.
The jq patch avoids this trade-off for the representation defect by preserving the value until the relevant check can be made. Whether the downstream filesystem operation has independent authorization remains another problem.
4. Is there always a point where one check is sufficient?
The preceding cases suggest that a guard ought to run early while it still has all relevant evidence. That is a good direction for an investigation but it is not a general implementation rule.
Consider a system that needs to decode a record before it can determine whether its logical contents are permitted. It cannot apply that semantic policy before decoding if the necessary observation is unavailable. Yet it cannot postpone its resource policy until after decoding if the decoding itself is the protected effect.
I wanted a concrete counterexample to the idea that moving every check to the earliest possible point necessarily solves the problem. The following experiment is a small finite model of that situation. It is not a model of the full implementation of either CVE.
A record carries its size n and its semantic permission bit p alongside an ordinary identifier id. The admissible domain is defined by n <= 3 AND p. There are three observation points:
| Point | Evidence available | Next operation |
|---|---|---|
| S0 | Size | Cost-bearing interpretation |
| S1 | Size and semantic value and identifier | Representation conversion |
| S2 | Size and identifier | Dispatch |
The interpretation stage costs work proportional to size by construction. The representation conversion discards the permission bit. A guard may stop the record at any of the three points. No guard is allowed to reject an admissible record. There is no network or real resource-consuming workload involved.
Figure 4. The two protected transitions have different last useful decision points. The guard edges depict the mediated design; the direct edges depict its unguarded pipeline.
4.1 Synthesize the strongest transparent local guard
Rather than write arbitrary predicates and compare them I defined the most restrictive deterministic guard possible at each observation point subject to one constraint: it must admit every valid record.
For a stage i with observation function O_i and valid domain V the allowed observation set is:
A_i = { O_i(x) : x belongs to V }
G_i(x) = O_i(x) belongs to A_i
Why is this useful? Every transparent local guard at that stage has to accept every member of A_i. A stricter guard would reject some valid record. A looser one could admit more invalid records. Suppose the synthesized guard fails to prevent an effect. No alternative deterministic memoryless predicate over that same observation can both prevent that effect and preserve every valid input.
This statement assumes the observation functions and transition ordering of the model. A real monitor may maintain history or obtain more evidence. That is precisely why the assumptions must be explicit.
The model exhausts all combinations of guard placement over 24 records. Six are valid. The core of the executed Python model is:
from itertools import product
D = tuple(product(range(1, 7), (False, True), ('A', 'B')))
def valid(x):
size, permitted, _ = x
return size <= 3 and permitted
def observe(x, stage):
size, permitted, name = x
if stage == 0:
return (size,)
if stage == 1:
return (size, permitted, name)
return (size, name)
def admissible_observations(stage):
return {observe(x, stage) for x in D if valid(x)}
The complete frontier.py in the accompanying archive evaluates the guards in execution order. It records whether interpretation exceeded its budget before rejection and whether a forbidden record was dispatched. It also records false rejection and final false acceptance separately.
4.2 The result is not in the final verdict
| Guard placement | Over-budget interpretation | Forbidden dispatch | Invalid final acceptance | Valid rejection |
|---|---|---|---|---|
| None | 12 | 12 | 18 | 0 |
| S0 | 0 | 6 | 6 | 0 |
| S1 | 12 | 0 | 0 | 0 |
| S2 | 12 | 6 | 6 | 0 |
| S0 + S1 | 0 | 0 | 0 | 0 |
| S0 + S2 | 0 | 6 | 6 | 0 |
| S1 + S2 | 12 | 0 | 0 | 0 |
| S0 + S1 + S2 | 0 | 0 | 0 | 0 |
These are exhaustive counts under the stated transition rules. There is no sampling or performance estimate.
S1 deserves a closer look. It produces a perfect final classifier. It rejects every invalid record and accepts every valid record. A conventional functional test would find no defect at all. Yet twelve records have already passed through interpretation outside its budget. The implementation has enforced one policy but failed another policy that concerns its own execution history.
S0 + S2 is equally informative. The early guard enforces the resource budget. There is also a guard immediately before dispatch. Despite that placement the implementation cannot enforce the semantic policy while preserving valid behavior because its observation no longer distinguishes permission states.
Can the latter design be repaired without moving the second guard? Yes. Extend the state transmitted through the projection so that the semantic evidence survives. I added this as a control in the model. With the permission bit retained S0 + S2 produces zero violations and zero false rejections.
That control distinguishes an information problem from an intervention problem. It is not the physical location of a check alone that determines whether it works. Its knowledge and its authority matter together.
The minimum adequate placement in the original finite model is S0 + S1. In the modified model S0 + S2 is also adequate. If we changed the permission policy or made the evidence mutable the result would need to be re-established. The model does not prove a two-guard lower bound for every program. It proves one for the observation and intervention constraints defined here.
5. The research method I would take into another codebase
The two case studies are useful because the failure is visible at interfaces that are often treated as implementation detail. I would not start a subsequent review by searching only for missing calls to a validator. I would reconstruct what the system promises about a particular effect.
First identify the effect. Is it allocation? Entry into a computational stage? Selection of a module? Creation of a published artifact? A claim about one of these cannot silently substitute for a claim about another.
Then identify the last event the implementation can veto without the protected effect already occurring. In the resource case the relevant history may start much earlier than an error-handling path. In the identity case the important event may be the compiler’s construction of an intermediate value rather than the final filesystem operation.
Next work backwards from that event through the observations available to the guard. What did the input look like before the previous transition? Is the representation length-bearing? Does the predicate depend on information which a canonicalizer removes? Could an apparently authoritative observation describe an earlier object rather than the one consumed now?
This produces a useful discipline for patch reviews:
| Claim | Required evidence | Insufficient substitute |
|---|---|---|
| Resource admission | Every path to the protected stage is admitted under its budget | A final error code |
| Semantic admission | The policy is evaluated over sufficient evidence of the consumed value | A successful check on unrelated or truncated metadata |
| Preservation of intended behavior | Valid-domain controls | A mechanism that simply denies every operation |
| Whole-system guarantee | Separate contracts for adjacent stages and their composition | The presence of a correct guard in one component |
I would apply the same discipline to other interfaces without assuming they are vulnerable. Decompression needs a budget that is meaningful in the expanded domain. A parser that delegates to another parser needs a clear account of which interpretation the policy recognizes. An asynchronous operation needs to preserve the state on which its authorization depends until the relevant effect occurs. Each of these examples requires its own evidence. They are research directions rather than additional findings.
The underlying question is whether the implementation permits a valid inference about the effect. Without that inference another predicate may only add a locally correct fact to an invalid argument.
There is a boundary to this methodology too. Some systems intentionally operate approximately. Some policies accept false rejection in favor of avoiding false acceptance. A rate limiter may regulate aggregate behavior rather than impose a per-message bound. The appropriate claim depends on that design contract. The point is to state it before reasoning about the implementation.
6. Why the historical source matters
In the CoreDNS v1.2.0 source from 2018 the GET conversion already exists without the later encoded-size admission guard. The historical POST implementation also differs from the modern bounded body read. It would therefore be incorrect to project the present GET/POST asymmetry backwards unchanged.
In the jq 1.5 compiler from 2015 the import constructor already receives a C-string name and constructs dependency metadata from it. The historical parser provides the corresponding earlier interface context. The change in 2026 addresses a representational assumption visible in that historical implementation.
| Project | Historical source witness | Fixed release | Approximate separation |
|---|---|---|---|
| CoreDNS | v1.2.0 / 2018 | v1.14.3 / 2026 | 8 years |
| jq | jq-1.5 / 2015 | jq-1.8.2 / 2026 | 11 years |
These dates identify historical witnesses. I have not established the first introducing commit or verified uninterrupted reachability across every intermediate release. They cannot establish when exploitation began or whether all downstream products exposed the relevant path throughout that period.
Why might assumptions like these survive for years? One explanation worth testing is that regression suites preserve the visible behavior of an interface more readily than they preserve a nonfunctional contract across internal transitions. The model experiments demonstrate how such an observation gap can exist. They do not establish that this was the historical reason these particular defects survived. That would require a review of the actual test history and design discussions.
A source history becomes useful when it tells us which assumptions persisted despite implementation changes. The age of a line is not the age of a security guarantee.
7. The boundary does not end at upstream
A change in upstream source must eventually be represented by something that can be shipped. This is a separate correspondence problem. An advisory identifies a defect. A package build identifies an artifact. A deployment identifies a running instance. None of these objects is interchangeable.
For these disclosures the public downstream evidence includes the following product-level records. Their semantics differ: some document remediation and some document affected-package assessments.
| Product or component | CVE | Record |
|---|---|---|
| Google Distributed Cloud for VMware | 32936 | Vulnerability fixes |
| IBM API Connect | 32936 | Security bulletin |
| IBM Concert Operate / Cloud Pak for AIOps | 32936 | Security bulletin |
| Cloudera Data Warehouse on Cloud | 32936 | Component remediation |
| Mirantis Kubernetes Engine | 32936 | Security information |
| Microsoft Azure Linux | Both | CoreDNS / jq |
| Amazon Linux | 43895 | Affected-package assessment |
| Red Hat product families | 43895 | Assessment and errata |
| Redis Data Integration | 43895 | Security update |
| AXIS OS | 43895 | Release notes |
A downstream component can include the relevant source without exposing the affected interface. It can also include a backport while retaining an older upstream version string. An affected assessment is not evidence that a fix has been published. Amazon Linux’s jq record illustrates that distinction.
To investigate propagation properly I would retain four independent timestamps. I would record when upstream merged the fix and when the first fixed downstream build appeared. I would also record when the advisory was published and when deployment was observed. Only the first three can ordinarily be established from repository and vendor records. Even those may be incomplete. The fourth requires evidence from the relevant operator or distribution channel.
This is why I do not use aggregate image pulls to estimate affected deployments. They cannot identify which builds were obtained or which code paths were reachable. The documented downstream records are the stronger evidence for this study.
8. Where the argument ends
A question remains after reading both fixes. What does a security decision actually authorize?
In CoreDNS it authorizes entry into a bounded conversion stage. It must be established before that stage begins. In jq it authorizes continuation with a name that satisfies the representation contract. It must be established while the original distinction can still be observed.
Both answers require a state that the implementation can still act on. The two defects are not the same root cause. Their repairs do not establish identical security properties. But they expose the same weakness in how a reviewer can reason about a successful check without examining the transitions on either side of it.
The conclusion I would carry into the next investigation is this: a guard has no authority over a completed effect and no knowledge of an erased distinction. A useful security boundary exists only where the program still has both the information to decide and the ability to intervene.
Evidence and reproducibility
Evidence availability. The companion archive last-point-of-control-evidence.zip was unavailable for this publication. It is not available to download from this page.
The archive contains the newly executed finite monitor-placement model and its output. It also contains the previous laboratory sources and original logs. For this revision I reran the C representation experiment and the Python partition experiment. I also reran the Go functional/trace tests. The earlier jq 1.7 observation is retained as prior evidence and was not repeated for this revision. No CoreDNS server or patched jq 1.8.2 executable was tested in this revision. Full vulnerable/fixed release pairs were unavailable to the local laboratory. The public upstream patch records and historical source files were inspected separately. No new target performance measurements or exploitation claims are made.
To rerun the offline models once the archive is available:
python3 frontier.py
python3 prior/contract_partitions.py
GO111MODULE=off go test -v prior/contract_test.go
cc -std=c11 -Wall -Wextra -Werror -fsanitize=undefined \
prior/representation.c -o /tmp/representation-check
/tmp/representation-check
Environment for the reruns: Python 3.13.5 and Go 1.23.2 on Linux amd64. The C model was compiled with undefined-behavior sanitization and completed without a diagnostic. The diagrams are authored as Mermaid flowcharts. The article renders them as static SVGs.
References
Upstream records