Blog
SavedSearch
Visit Hostlelo

Unbound 1.26.2: Patch Your VPS DNS Resolver Safely

Unbound 1.26.2 fixed five more CVEs after a Critical DNSKEY bug. Learn to check your VPS resolver when the distro version number looks old but may be patched.

The short answer

If your VPS runs its own Unbound resolver, it needs Unbound 1.26.2 or a distro package with the same fixes backported. Debian and Ubuntu packages often keep an older upstream version number, so check the package version and its changelog, not only unbound -V. Back up /etc/unbound, upgrade through your package manager, then confirm with unbound-control status and a dig test against 127.0.0.1.

Reading options

On this page

If your VPS runs its own Unbound resolver, you need a build that includes the fixes from Unbound 1.26.2, or a distro package that has those fixes backported. On a Debian or Ubuntu server, the version number that unbound -V prints can look old and still be patched, so you have to check the package version too. The good news is that checking does not take long.

Here is the surprising part. On 16 September 2026, NLnet Labs rated CVE-2026-81642 Critical, a heap overflow in DNSSEC key handling with possible remote code execution. Then on 21 October 2026 they shipped five more fixes in 1.26.2. A patched Ubuntu 24.04 server will still tell you "1.19.2" when you ask Unbound for its version.

By the end of this guide you will know what is really running on your server, whether it is exposed, how to upgrade it safely, and how to prove the upgrade worked.

Why can't you trust the Unbound version number?

Unbound is a DNS resolver. A resolver is the program that answers the question "what IP address does example.com have?" for your server. It asks other DNS servers on the internet, checks the answers, and keeps them in a cache so the next lookup is fast.

Unbound also does DNSSEC validation. DNSSEC is a system of digital signatures on DNS records, so your resolver can tell if an answer was forged. That checking work is exactly where the September bug lived.

First, a reality check. This guide is for people with a VPS or dedicated server who run their own resolver. A very common case is a mail server, because spam filters do a lot of DNS lookups and many admins point them at a local Unbound. If you are not sure what kind of hosting you have, start with what web hosting actually is.

Now the tricky part. Think of a car that goes back to the dealer for a safety recall. The mechanic fixes the brakes, but the model year on the papers does not change. Your 2019 car is still a 2019 car, only safer.

Distro packages work the same way. Debian and Ubuntu often keep the old upstream version and add the fix on top. That is called a backport. So unbound -V shows the upstream number, while the real story is in the package version after the dash.

At the time of writing (23 November 2026), Ubuntu's security page for CVE-2026-81642 lists these fixed packages:

  • Ubuntu 26.04 LTS: 1.24.2-1ubuntu2.3
  • Ubuntu 24.04 LTS: 1.19.2-1ubuntu3.10
  • Ubuntu 22.04 LTS: 1.13.1-1ubuntu5.16
  • Ubuntu 20.04 LTS: 1.9.4-2ubuntu1.11+esm2, which needs Ubuntu Pro
  • Ubuntu 26.10: "Needs evaluation"

Every upstream number in that list is below 1.26.1. They are still listed as fixed.

What did 1.26.1 and 1.26.2 actually fix?

A CVE is a public ID number for one security bug, so everyone can talk about the same problem. Here is what the NLnet Labs advisory page says, in their words, kept short.

The September release, 1.26.1 (16 September 2026), fixed several bugs in versions up to and including 1.26.0. The headline one:

  • CVE-2026-81642, Critical: "Heap buffer overflow and possible Remote Code Execution when digesting DNSKEY."

The advisory explains the attack. Someone has to control a malicious DNS zone and get your Unbound to query it. A resolver that looks up domains taken from incoming email queries names chosen by strangers, so keep that in mind.

Why this matters: the fix for this one is Unbound 1.26.1 or later, or the patch for 1.26.0, or a distro package that backports it.

The October release, 1.26.2 (21 October 2026), fixed five more, all in versions up to and including 1.26.1:

  • CVE-2026-97206, High: use-after-free in DNS-over-QUIC (DoQ) path migration on multi-threaded deployments, affecting 1.22.0 to 1.26.1.
  • CVE-2026-50106, Medium: possible insecure NXDOMAIN under a configured island trust anchor below an insecure parent.
  • CVE-2026-96405, Medium: chained pointer decompression work that can degrade service.
  • CVE-2026-109125, Medium: possible cache poisoning through a side channel exposed by unwanted-reply-threshold.
  • CVE-2026-35501, Low: bypass of a configured island trust anchor from an attacker-controlled NSEC record.

Cache poisoning means tricking a resolver into storing a fake answer, so every user of that resolver gets sent to the wrong place.

Heads up: the advisory page also lists CVE-2026-44690, a High rated cross-zone wildcard cache poisoning bug fixed in 1.25.2 on 22 July 2026. If you have not updated since 22 July, you are behind on more than one release.

Quick tip: two of the October bugs depend on a feature being in use. CVE-2026-97206 is about DNS-over-QUIC, and the CVE-2026-109125 advisory says the attack is not feasible on default configurations, only with unwanted-reply-threshold above 0. The docs list unwanted-reply-threshold as disabled by default (0). Do not treat changing a setting as a fix, though. The advisories offer no workaround, only the patched version or the patch.

Before you start

You do not need much, but do not skip this list.

  • Root or sudo access to the server.
  • Know your OS and release, for example Ubuntu 24.04 or Debian 12.
  • A backup of your Unbound config. Step 2 shows you how.
  • A quiet maintenance window. An upgrade restarts Unbound, and the cache starts empty.
  • A second resolver to test against, if you can. Even a second VPS or a local container helps.
  • If other machines use this resolver, a plan for a minute or two of DNS failure.

Here is a made-up example of why the window matters. Imagine Sara runs a small mail server for her company on a VPS at 203.0.113.25. Her spam filter checks every message against DNS blocklists through Unbound on 127.0.0.1. She upgrades at 11:00 on a Monday, Unbound fails to start because of an old config line, and for twenty minutes every incoming message gets a temporary rejection. Sara and the numbers are invented. The pattern is real, and a backup plus a config check prevents it.

How to check and patch your resolver

Step 1: Find out what is actually running

This command asks the Unbound binary for its version and build options and then exits.

unbound -V

You will see the upstream version on the first line, followed by build options. Write it down. If it says 1.26.2 or newer, you are on the current upstream release. If it says something older, keep reading, because a distro package may still be patched.

Next, ask the package manager what is installed and what is available. On Debian and Ubuntu, this command shows the installed version, the candidate version apt would install, and a version table.

apt-cache policy unbound

Look at two lines.

Installed: <the version on your server>
Candidate: <the version apt would install>

If Candidate is newer than Installed, an update is waiting. Compare Installed to the fixed version for your release on your distro's security tracker.

On RHEL, AlmaLinux, Rocky, Fedora and other dnf-based systems, this command shows information about the installed and available package.

dnf info unbound

This command checks only whether an update for Unbound is available, without changing anything.

dnf check-update unbound

The dnf docs say it exits with 100 when updates exist, 0 when there are none, and 1 on error.

Finally, check that the service is running. This command shows the runtime status of the Unbound unit and the last few log lines.

systemctl status unbound

You want to see it reported as active. If it is not running, check the Troubleshooting section before you touch anything else.

Step 2: Back up /etc/unbound

Do this before any upgrade or config change. This command copies the whole config folder and keeps file permissions and links.

sudo cp -a /etc/unbound /etc/unbound.bak-2026-11-23

The Debian manual page puts the main config at /etc/unbound/unbound.conf. If you built Unbound from source, the default config path is /usr/local/etc/unbound/unbound.conf instead, so back up that folder.

sudo cp -a /usr/local/etc/unbound /usr/local/etc/unbound.bak-2026-11-23

Quick tip: if unbound -V shows build options, save that output too. If you build from source later, you will want the same options again.

unbound -V > ~/unbound-build-options-before.txt

Step 3: Read the package changelog

The changelog tells you which CVEs your exact package fixes. This is how you settle the "old number, but patched?" question for yourself. On Debian and Ubuntu, this command downloads and shows the changelog of the installed package.

apt-get changelog unbound

Search inside it for the CVE number, for example CVE-2026-81642. If the entry is there, your package includes that fix.

On dnf systems, this command prints the changelog delta of packages about to be updated.

dnf check-update --changelogs unbound

Step 4: Upgrade the distro package

This is the path most people should take. Your distro tests the build with your OS and keeps it updated.

On Debian and Ubuntu, first refresh the package lists.

sudo apt-get update

Then upgrade only Unbound, without installing anything new.

sudo apt-get install --only-upgrade unbound

On dnf systems, this command updates Unbound and any dependencies it needs.

sudo dnf upgrade unbound

To be sure the new code is the one running, restart the service yourself.

sudo systemctl restart unbound

Step 5: Or install upstream 1.26.2 from source

Only do this if your distro has no fixed package and you are comfortable maintaining a source build. You take over security updates from then on.

The official installation guide uses these build tools and libraries on Ubuntu.

sudo apt install -y build-essential libssl-dev libexpat1-dev bison flex

This downloads and unpacks the latest release tarball from NLnet Labs.

wget https://nlnetlabs.nl/downloads/unbound/unbound-latest.tar.gz
tar xzf unbound-latest.tar.gz

Before you build, check the file. NLnet Labs publishes a SHA-256 checksum and a PGP signature for each download. The 1.26.2 announcement gives the SHA-256 as d8ee7aa6bbb3ff1be7d9e57637d0d0ec2f18273a8efff1a0afe2c665858b96f7.

Then configure, build and install from inside the unpacked folder.

./configure
make
sudo make install

Heads up: run ./configure -h to see options, and match the options you saved in Step 2. A source build installs under /usr/local by default, so it does not replace a distro package. Make sure your service file points at the binary you mean to run.

What changes on Debian, RHEL-family and Docker

Debian 13 (trixie): at the time of writing (23 November 2026), the Debian tracker lists trixie as fixed for CVE-2026-81642 with 1.26.2-0+deb13u1 in its table of vulnerable and fixed packages. A second table on the same page, the fixed-version data, lists 1.26.1-0+deb13u1 from DSA-6507-1. The page does not explain why the two versions differ. Both are 1.26.1 or newer, so check your own changelog as in Step 3 to see which one you have.

Debian 12 (bookworm): as listed on the tracker on the day this was written (23 November 2026), bookworm shows 1.17.1-2+deb12u4 as vulnerable to CVE-2026-81642, with no fixed version listed. I re-checked it today. The same is listed for CVE-2026-109125. Keep watching the tracker, and think about whether this server should move to trixie.

Ubuntu: the September fix is out for supported LTS releases as listed above. At the time of writing, Ubuntu's page for CVE-2026-109125 shows every release as "Needs evaluation", so the October fixes may not be packaged yet.

RHEL-family: the dnf commands above work the same way, but I did not verify each vendor's fixed package for this post. Check your vendor's security advisory for Unbound and then use Step 3 to confirm.

Docker: NLnet Labs does not publish an official image that I could find, and the images people use are community builds. Check the version inside the running container with docker exec.

docker exec <container-name> unbound -V

To upgrade, follow that image maintainer's instructions for a new tag, recreate the container, and run the check again.

How to check it worked

Run these four checks after the upgrade. Each one should pass before you call it done.

Check the binary

This shows the version again.

unbound -V

Upstream or source builds should show 1.26.2. Distro builds may show the same old upstream number, which is fine as long as apt-cache policy unbound shows the fixed package as Installed.

Check the daemon with unbound-control

This command asks the running server for its status.

sudo unbound-control status
echo $?

The man page says the exit code is 0 if running, 3 if not running (the connection is refused), and 1 on error. So you want 0.

Check that DNS answers and DNSSEC works

This queries your local resolver directly for a domain that should validate.

dig @127.0.0.1 -t A +dnssec isc.org

In the header you want something like this.

;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 23376
;; flags: qr rd ra ad; QUERY: 1, ANSWER: 5, AUTHORITY: 0, ADDITIONAL: 1

NOERROR means the lookup worked. The ad flag means "authenticated data", so the resolver validated the answer. Your id and counts will differ.

Now test a domain that is broken on purpose, to prove validation is switched on.

dig @127.0.0.1 -t A +dnssec dnssec-failed.org

You want status: SERVFAIL with no answers. That is the resolver correctly refusing a forged-looking answer. If you have ever seen a site go dark this way and wondered why, our post on the 2026 DNSSEC root key rollover and SERVFAIL errors walks through it.

Check the log

By default Unbound sends logs to syslog, so on a systemd server they land in the journal. This shows the last 50 lines for the unit.

sudo journalctl -u unbound -n 50

You want a clean start with no errors after the restart time.

Troubleshooting

The version still looks old after the upgrade

Symptom: unbound -V shows 1.19.2 or 1.17.1 after apt-get install --only-upgrade.

Likely cause: this is normal on a distro package. The fix is backported. Fix: run apt-cache policy unbound and check that Installed matches your release's fixed version, then search apt-get changelog unbound for the CVE.

Candidate is the same as Installed, but the tracker says there is a fix

Symptom: apt-cache policy unbound shows no newer Candidate.

Likely cause: the package lists are stale, or the security repository is not enabled on this server. Fix: run sudo apt-get update and check again. If nothing changes, check that your sources include your release's security repository.

unbound-control status returns exit code 3 or 1

Symptom: echo $? prints 3 after unbound-control status.

Likely cause: the connection to the control port is refused. That happens when the server is not running. Exit code 1 means another error, so read the message it prints. Fix: start the service and check the journal. If it is running, create the control keys with sudo unbound-control-setup, set control-enable: yes in the remote-control: section, and restart.

Unbound will not start after the upgrade

Symptom: systemctl status unbound shows the service as failed.

Likely cause: a config line the new version does not accept, or a typo. Fix: check the config before you restart again. unbound-checkconf exits with 0 when the file is valid and 1 when it finds an error, and it prints what is wrong.

sudo unbound-checkconf /etc/unbound/unbound.conf

If you cannot fix it fast, restore the backup from Step 2 and restart. For a deeper look, the docs suggest running Unbound in the foreground with extra logging using unbound -d -vv -c followed by your config file.

It cannot bind to the address because the address is in use

Symptom: Unbound reports it cannot bind to 0.0.0.0 because the address is already in use.

Likely cause: the Unbound docs point to systemd-resolved already holding port 53, or an old Unbound instance still running. Fix: set interface: 127.0.0.1 in the config, or stop the other instance before starting the new one.

Source build fails with shared library errors, or unbound-anchor cannot write the key

Symptom: library loading errors when you run the new binary, or unbound-anchor fails with a permission problem.

Likely cause: the system linker cache is not updated, or the trust anchor file is owned by the wrong user. Fix: the docs suggest running ldconfig for library errors, and running sudo -u unbound unbound-anchor for the permission problem.

dnssec-failed.org returns NOERROR

Symptom: the broken test domain resolves with answers.

Likely cause: DNSSEC validation is not active, often because auto-trust-anchor-file is not set. It has no default. Fix: point auto-trust-anchor-file in the server: section at your root key file. On Ubuntu 22.04 the docs show it at /var/lib/unbound/root.key.

Pro tips and when to ask for help

Keep a second resolver line in /etc/resolv.conf only if you trust that resolver. A public resolver as a fallback means some queries leave your server unvalidated.

After a reload, the cache is empty. The man page says reload flushes the cache and reads the config fresh, while reload_keep_cache tries to keep the cache if the configuration allows it. Use the second one for small config changes on a busy mail server.

Security note: patch first, then review settings. If you enabled DNS-over-QUIC on quic-port and you run multiple threads, CVE-2026-97206 is the one to read first. The docs say setting quic-port to 0 disables QUIC, but the advisory gives no workaround, so the upgrade is still the fix.

Ask your provider or a developer when your distro has no fixed package and you have never built from source, when Unbound sits inside a control panel stack you did not set up, or when the server also handles your DNS records. If you are cleaning up DNS anyway, it is a good time to check your CAA records too.

The one message worth forwarding

Copy this to your sysadmin or hosting provider.

Hi, quick security check on our VPS DNS resolver.

Unbound 1.26.1 (16 Sep 2026) fixed CVE-2026-81642, rated Critical by NLnet Labs (DNSKEY heap overflow, possible RCE). Unbound 1.26.2 (21 Oct 2026) fixed five more CVEs, including CVE-2026-97206 (DoQ, High).

Could you please:
1. Run "unbound -V" and "apt-cache policy unbound" (or "dnf info unbound") and send me the output.
2. Confirm the installed package includes these fixes (check the package changelog for the CVE numbers).
3. Back up /etc/unbound, upgrade, and confirm "unbound-control status" exits 0 and "dig @127.0.0.1 isc.org" returns NOERROR.

Note: distro packages often keep an older version number with the fix backported, so the version alone is not enough.

Thanks!

The takeaway: trust the package version and its changelog, not the upstream number, and prove the fix with a status check and a dig test.

Reader questions

Do I need to worry about this on shared hosting?

Usually not. On shared hosting the provider runs the DNS resolvers, so patching them is their job. This matters when you run your own resolver on a VPS or dedicated server.

Is my server safe if unbound -V shows 1.19.2 on Ubuntu 24.04?

It can be. Ubuntu lists package 1.19.2-1ubuntu3.10 as fixed for CVE-2026-81642, so check the full package version with apt-cache policy unbound.

Which Unbound release fixed the Critical DNSKEY bug?

Unbound 1.26.1, released on 16 September 2026, fixed CVE-2026-81642. Unbound 1.26.2 from 21 October 2026 includes that fix plus five more.

Does the DNS-over-QUIC bug affect older Unbound versions?

NLnet Labs lists CVE-2026-97206 as affecting Unbound 1.22.0 up to 1.26.1.

Is there a workaround if I cannot upgrade today?

The NLnet Labs advisories list no workarounds for these bugs, only the patched release or the patch files. Plan the upgrade rather than relying on a setting change.

Is Debian 12 bookworm patched?

On 23 November 2026 the Debian tracker listed bookworm package 1.17.1-2+deb12u4 as vulnerable to CVE-2026-81642 with no fixed version. Check the tracker again, since this can change.

Sources & further reading

  1. NLnet Labs: Unbound security advisories
  2. NLnet Labs: CVE-2026-81642 advisory
  3. NLnet Labs: Unbound download page
  4. NLnet Labs community: Unbound 1.26.2 released
  5. Ubuntu security: CVE-2026-81642
  6. Debian security tracker: CVE-2026-81642
  7. Unbound docs: unbound-control manual
  8. Unbound docs: installation
  9. Ubuntu Server docs: basic DNSSEC troubleshooting
  10. DNF command reference

Originally published . About our editorial updates.

Your next project deserves a better foundation.

Explore hosting built for your next chapter.

Explore hosting

Find your next answer.

Search published guides and articles.

Ctrl / ⌘ K to open · Esc to close