A race condition in the nginx module in Phusion Passenger 3.x through 5.x before 5.3.2 allows local escalation of privileges when a non-standard passenger_instance_registry_dir with insufficiently strict permissions is configured. Replacing a file with a symlink after the file was created, but before it was chowned, leads to the target of the link being chowned via the path. Targeting sensitive files such as root's crontab file allows privilege escalation.
https://security.gentoo.org/glsa/201807-02
https://pulsesecurity.co.nz/advisories/phusion-passenger-priv-esc
https://lists.debian.org/debian-lts-announce/2018/06/msg00007.html