# CVE-2023-6516: Specific recursive query patterns may lead to an out-of-memory condition

> Attackers can cause a denial of service in BIND by triggering recursive queries that exhaust memory, affecting DNS server availability.

- **Severity:** High 7.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 13 Feb 2024
- **Updated:** 13 Feb 2025
- **Also known as:** ALPINE-CVE-2023-6516, AZL-34561, CLSA-2026-1786523775, CLSA-2026-1786525602, CLSA-2026-1787221736, CLSA-2026-1787401059, CLSA-2026-1787645299, CLSA-2026-1787659784, CLSA-2026-1787670751, CLSA-2026-1788000191, CLSA-2026-1789036496, DEBIAN-CVE-2023-6516, GHSA-8mxm-4gjm-vrc7, UBUNTU-CVE-2023-6516

## What is CVE-2023-6516?

CVE-2023-6516 is a high-severity denial of service vulnerability in Isc Bind, published on 13 Feb 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

To keep its cache database efficient, `named` running as a recursive resolver occasionally attempts to clean up the database. It uses several methods, including some that are asynchronous: a small chunk of memory pointing to the cache element that can be cleaned up is first allocated and then queued for later processing. It was discovered that if the resolver is continuously processing query patterns triggering this type of cache-database maintenance, `named` may not be able to handle the cleanup events in a timely manner. This in turn enables the list of queued cleanup events to grow infinitely large over time, allowing the configured `max-cache-size` limit to be significantly exceeded.
This issue affects BIND 9 versions 9.16.0 through 9.16.45 and 9.16.8-S1 through 9.16.45-S1.

Weakness: CWE-770 (Allocation of Resources Without Limits or Throttling), CWE-789 (Memory Allocation with Excessive Size Value)

## Which versions are affected by CVE-2023-6516?

It affects 2 products.


Products: Isc Bind, Netapp Active Iq Unified Manager.

## How do I fix CVE-2023-6516?

Upgrade to a fixed version.

## Is CVE-2023-6516 being exploited?

There is no known exploitation of CVE-2023-6516 in the wild and no public exploit code.

## Other vulnerabilities in Isc Bind

- [CVE-2008-0122](https://insights.sbomify.com/CVE-2008-0122/): Memory corruption in n/a (critical 10.0)
- [CVE-2001-0010](https://insights.sbomify.com/CVE-2001-0010/): Memory corruption in n/a (critical 10.0)
- [CVE-2001-0011](https://insights.sbomify.com/CVE-2001-0011/): Memory corruption in n/a (critical 10.0)
- [CVE-2001-0013](https://insights.sbomify.com/CVE-2001-0013/): Memory corruption in n/a (critical 10.0)
- [CVE-2000-1029](https://insights.sbomify.com/CVE-2000-1029/): Memory corruption in n/a (critical 10.0)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2023-6516 and fix it if it is affected.

What it is: CVE-2023-6516 is a high-severity denial of service vulnerability in Isc Bind, published on 13 Feb 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2023-6516 in the wild and no public exploit code.

Affected product: Isc Bind. No package-level version data is available, so check the vendor advisory linked from the reference page.

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/CVE-2023-6516/ (Markdown: https://insights.sbomify.com/CVE-2023-6516/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2023-6516
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2023-6516
- OSV: https://osv.dev/vulnerability/CVE-2023-6516

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