CVE-2020-28935
Local symlink attack in Unbound and NSD
Check your servers for CVE-2020-28935
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2020-28935 affects nsd, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
Description
NLnet Labs Unbound, up to and including version 1.12.0, and NLnet Labs NSD, up to and including version 4.3.3, contain a local vulnerability that would allow for a local symlink attack. When writing the PID file, Unbound and NSD create the file if it is not there, or open an existing file for writing. In case the file was already present, they would follow symlinks if the file happened to be a symlink instead of a regular file. An additional chown of the file would then take place after it was written, making the user Unbound/NSD is supposed to run as the new owner of the file. If an attacker has local access to the user Unbound/NSD runs as, she could create a symlink in place of the PID file pointing to a file that she would like to erase. If then Unbound/NSD is killed and the PID file is not cleared, upon restarting with root privileges, Unbound/NSD will rewrite any file pointed at by the symlink. This is a local vulnerability that could create a Denial of Service of the system Unbound/NSD is running on. It requires an attacker having access to the limited permission user Unbound/NSD runs as and point through the symlink to a critical file on the system.
Exploitation
EPSS 0.49%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 44.0% of all scored CVEs. Scores of 1 Dec 2026.
Weakness
- CWE-59 Improper Link Resolution Before File Access
Affected products
As the CNA lists them.
Is my server affected?
Find the installed version of nsd and compare it with the fixed version of your distribution. Distributions often fix a CVE in a package version of their own, so the version number of the upstream project can mislead.
Debian, Ubuntu
dpkg -l | grep -i nsd
# packages whose changelog names the CVE (fixed in the installed version)
zgrep -l CVE-2020-28935 /usr/share/doc/*/changelog.Debian.gz
# Ubuntu
pro fix CVE-2020-28935RHEL, Rocky, Alma, Fedora
rpm -q nsd
# lists the advisory while the fix is not installed
dnf updateinfo list --cve CVE-2020-28935Alpine
apk list --installed | grep -i nsdWith Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2020-28935
trivy image --scanners vuln IMAGE | grep CVE-2020-28935
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Advisories
- GLSA-202101-38 security.gentoo.org · vendor advisory
Other references
- https://www.nlnetlabs.nl/downloads/unbound/CVE-2020-28935.txt nlnetlabs.nl
- https://www.nlnetlabs.nl/downloads/nsd/CVE-2020-28935.txt nlnetlabs.nl
- [debian-lts-announce] 20210212 [SECURITY] [DLA 2556-1] unbound1.9 security update lists.debian.org · mailing list
- [debian-lts-announce] 20230329 [SECURITY] [DLA 3371-1] unbound security update lists.debian.org · mailing list
Source: the record CVE-2020-28935 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse