// For flags

CVE-2020-28935

Local symlink attack in Unbound and NSD

Severity Score

5.5
*CVSS v3.1

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

0
*Multiple Sources

Exploited in Wild

-
*KEV

Decision

-
*SSVC
Descriptions

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.

NLnet Labs Unbound, hasta la versión 1.12.0 incluyéndola, y NLnet Labs NSD, hasta la versión 4.3.3 incluyéndola, contienen una vulnerabilidad local que permitiría un ataque de tipo symlink local. Al escribir el archivo PID, Unbound y NSD crean el archivo si no está allí, o abren un archivo existente para escribir. En caso de que el archivo ya existiera, seguirían enlaces simbólicos si el archivo fuera un enlace simbólico en lugar de un archivo normal. Luego, se llevaría a cabo una copia adicional del archivo después de que se escribió, lo que haría que el usuario Unbound/NSD se ejecute como el nuevo propietario del archivo. Si un atacante tiene acceso local al usuario con el que se ejecuta Unbound/NSD, podría crear un enlace simbólico en lugar del archivo PID que apunta hacia un archivo que le gustaría borrar. Si luego Unbound/NSD es eliminado y el archivo PID no se borra, al reiniciar con privilegios root, Unbound/NSD reescribirá cualquier archivo apuntado por el enlace simbólico. Esta es una vulnerabilidad local que podría crear una Denegación de Servicio del sistema en el que se ejecuta Unbound/NSD. Requiere que un atacante tenga acceso al usuario de permiso limitado que se ejecuta como Unbound/NSD y apunta por medio del enlace simbólico a un archivo crítico en el sistema

A symbolic link traversal vulnerability was found in unbound in the way it writes its PID file while starting up. This flaw allows a local attacker with access to the unbound user to set up a link to another file, owned by root, and make unbound overwrite it during its next restart, destroying the original content. The highest threat from this vulnerability is integrity.

*Credits: We would like to thank Mason Loring Bliss for bringing the issue to our attention.
CVSS Scores
Attack Vector
Local
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High
Attack Vector
Local
Attack Complexity
Low
Privileges Required
High
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
None
Attack Vector
Local
Attack Complexity
Low
Authentication
None
Confidentiality
None
Integrity
None
Availability
Partial
* Common Vulnerability Scoring System
SSVC
  • Decision:-
Exploitation
-
Automatable
-
Tech. Impact
-
* Organization's Worst-case Scenario
Timeline
  • 2020-11-18 CVE Reserved
  • 2020-12-07 CVE Published
  • 2023-03-30 EPSS Updated
  • 2024-09-16 CVE Updated
  • ---------- Exploited in Wild
  • ---------- KEV Due Date
  • ---------- First Exploit
CWE
  • CWE-59: Improper Link Resolution Before File Access ('Link Following')
CAPEC
Affected Vendors, Products, and Versions
Vendor Product Version Other Status
Vendor Product Version Other Status <-- --> Vendor Product Version Other Status
Nlnetlabs
Search vendor "Nlnetlabs"
Name Server Daemon
Search vendor "Nlnetlabs" for product "Name Server Daemon"
< 4.3.4
Search vendor "Nlnetlabs" for product "Name Server Daemon" and version " < 4.3.4"
-
Affected
Nlnetlabs
Search vendor "Nlnetlabs"
Unbound
Search vendor "Nlnetlabs" for product "Unbound"
< 1.13.0
Search vendor "Nlnetlabs" for product "Unbound" and version " < 1.13.0"
-
Affected
Debian
Search vendor "Debian"
Debian Linux
Search vendor "Debian" for product "Debian Linux"
9.0
Search vendor "Debian" for product "Debian Linux" and version "9.0"
-
Affected