# CVE-2026-142125 - POSIX: DNS script hook privilege escalation

On POSIX platforms, when OpenVPN drops privileges with `--user`, it forks a separate runner process that retains root privileges in order to execute the `--dns-updown` script. On DNS changes the unprivileged main process wrote the `dns_*` variables to a temporary file and passed the path of that file to the privileged runner. The runner had the DNS updown script source the file as root and then deleted it, without validating the supplied path or the ownership of the file. The root runner therefore trusted data written and controlled from the unprivileged side of the privilege boundary, allowing shell code to be executed as root or an arbitrary path to be deleted as root. Systems are only affected when `--user` is set and a DNS updown script, default or custom, is in use, and the attacker must already be able to run code as the `--user` account, which is frequently a shared service account. The fix passes the DNS variables to the runner over a pipe and accepts only variable names on an allow list.

OpenVPN versions 2.7_alpha1 through 2.7.9 are affected. This is fixed in version 2.7.10.

CVE Record: [CVE-2026-142125](https://www.cve.org/CVERecord?id=CVE-2026-142125)

Release notes:
* [openvpn-2.7.10](https://community.openvpn.net/ReleaseHistory#openvpn-2710-released-2-december-2026)

Reported-By: Paul Jenkins
Reported-By: Deri Haerudi
Reported-By: Bhabani Sankar Das
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9