The CVE number for this vulnerability is CVE-2020-28935. == Summary Unbound and NSD when writing the PID file would not check if an existing file was a symlink. This could allow for a local symlink attack if an attacker has access to the user Unbound/NSD runs as. == Affected products Unbound up to and including 1.12.0. NSD up to and including 4.3.3. == Description 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. == Solution Download patched version of Unbound (1.13.0) and/or NSD (4.3.4), or apply the patches manually. + Unbound Unbound 1.13.0 is going to be released including the patch. The patch is: https://nlnetlabs.nl/downloads/unbound/patch_cve-2020-28935_unbound.diff and can be applied to versions 1.6.6 up until 1.12.0. Apply the patch containing the fix using: 'patch -p1 < patch_cve-2020-28935_unbound.diff' then run 'make install' to install Unbound. + NSD NSD 4.3.4 is going to be released including the patch. The patch is: https://nlnetlabs.nl/downloads/nsd/patch_cve-2020-28935_nsd.diff and can be applied to versions 4.2.3 up until 4.3.3. Apply the patch containing the fix using: 'patch -p1 < patch_cve-2020-28935_nsd.diff' then run 'make install' to install NSD. == Acknowledgements We would like to thank Mason Loring Bliss for bringing the issue to our attention.