The vulnerability lies in the improper handling of TSIG (Transaction Signature) authentication across multiple transport protocols in CoreDNS: gRPC, QUIC, DoH, and DoH3. The root cause differs slightly between the protocols.
For DoH (DNS-over-HTTPS) and DoH3, the vulnerability was most severe. The DoHWriter.TsigStatus function was hardcoded to return nil, which falsely signaled to the tsig plugin that every request was successfully authenticated. This meant any request containing a TSIG record, regardless of its validity, would bypass authentication. The fix involved modifying ServerHTTPS.ServeHTTP and ServerHTTPS3.ServeHTTP to perform a full TSIG verification using dns.TsigVerify on the raw DNS message and storing the result, which is then returned by DoHWriter.TsigStatus.
For gRPC and QUIC, the vulnerability was that the server only checked if the TSIG key name existed in its configuration but did not actually verify the cryptographic signature (HMAC) of the message. This allowed an attacker who knew a valid key name to send forged requests that would be accepted as authentic. The fix, applied in ServergRPC.Query and ServerQUIC.serveQUICStream, was to add a call to dns.TsigVerify to ensure the HMAC is validated against the configured secret.
In summary, the identified functions were the entry points for handling requests over the vulnerable transports, and they either completely lacked or had incomplete TSIG verification logic, allowing for an authentication bypass.