# RUSTSEC-2026-0310: Various panics, soundness and resource exhaustion issues

> Attackers can cause denial of service via resource exhaustion or panics by sending malicious DNS messages to applications using this Rust DNS library.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 25 Sep 2026

## What is RUSTSEC-2026-0310?

RUSTSEC-2026-0310 is a denial of service vulnerability in domain, published on 25 Sep 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Version 0.12.3 fixes a large number of panics, soundness issues, and
CPU and memory exhaustion issues in all parts of the crate.

The following is a summary of the issues per affected components.
For details, please see the [release
notes](https://github.com/NLnetLabs/domain/releases/tag/v0.12.3).

## Base

* Limited the number of compression pointers that are followed when parsing
  a compressed name to 255 to avoid following really long chains.
* Limited the length of CNAME chains followed by `Message::canonical_name`
  to 20. This also fixed an integer overflow in this method when ANCOUNT
  was`u16::MAX`.
* Changed `QuestionSection::answer` to skip over all remaining questions
  without parsing the QNAMEs to avoid being slowed down by malicious
  names.
* Added length checks when scanning and parsing variable length record
  data types. This fixes issues with the message builder, which assumes that
  record data is never too large for placing in a message.

## Stub Resolver

* Fixed possible panics in the resolver’s `FoundHosts::qname` and
  `FoundHosts::canonical_name`.
* Fixed various issues in SRV processing.

## Zonefile parsing

* Fixed soundness issues when reading UTF-8 and an integer overflow when
  reading unsigned integers.
* Fixed a panic when reading empty TXT records.

## Client and server transports, DNSSEC signer and validator

Fixed various panics that could be triggered by malicious incoming DNS
messages.

## Zonetree

Fixed various panics and a memory exhaustion issue when updating the zone.

## Acknowledgements

We would like to thank Qifan Zhang, Palo Alto Networks,
Antoni (Tony) Jagodka ([@DrVelvetFog](https://github.com/DrVelvetFog)),
and [@SebastiaanYN](https://github.com/SebastiaanYN) for
reporting issues fixed in this release.

## Which versions are affected by RUSTSEC-2026-0310?

1 open source package ship an affected version, including domain.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `domain` | crates.io | From 0.0.0-0 | 0.12.3 |

## How do I fix RUSTSEC-2026-0310?

Upgrade domain to 0.12.3 or later.

## Is RUSTSEC-2026-0310 being exploited?

There is no known exploitation of RUSTSEC-2026-0310 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for RUSTSEC-2026-0310 and fix it if it is affected.

What it is: RUSTSEC-2026-0310 is a denial of service vulnerability in domain, published on 25 Sep 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of RUSTSEC-2026-0310 in the wild and no public exploit code.

Affected packages and fixed versions:
- domain (crates.io): affected from 0.0.0-0; fixed in 0.12.3

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/RUSTSEC-2026-0310/ (Markdown: https://insights.sbomify.com/RUSTSEC-2026-0310/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/RUSTSEC-2026-0310

---
From sbomify Insights: https://insights.sbomify.com/RUSTSEC-2026-0310/
Summaries are generated and may contain mistakes; the official description above is the record.
