CVE-2020-28935 Local symlink attack in Unbound and NSD
Local attackers can exploit symlink handling in PID file creation to overwrite critical system files, causing denial of service.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2020-28935?
CVE-2020-28935 is a medium-severity path traversal vulnerability in Debian Debian Linux, published on 7 Dec 2020. It can only be exploited from the same machine or local network, with no action from the victim.
Official 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.
Weakness: CWE-59
Which versions are affected by CVE-2020-28935?
It affects 3 products.
Linux distribution packages (1)
sslh openSUSE:Tumbleweed | All versions | 2.2.3-1.1 |
Products include Debian Debian Linux, Nlnetlabs Name Server Daemon, Nlnetlabs Unbound.
How do I fix CVE-2020-28935?
Upgrade to a fixed version.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
Is CVE-2020-28935 being exploited?
There is no known exploitation of CVE-2020-28935 in the wild and no public exploit code.
Other vulnerabilities in Debian Debian Linux
Sources
Also known as ALPINE-CVE-2020-28935, AZL-6931, DEBIAN-CVE-2020-28935, GHSA-q92f-7cwj-w4w5, MGASA-2021-0154, OESA-2021-1083 and 2 more.