CVE-2016-1247·Nginx vulnerability
The nginx package before 1.6.2-5+deb8u3 on Debian jessie, the nginx packages before 1.4.6-1ubuntu3.6 on Ubuntu 14.04 LTS, before 1.10.0-0ubuntu0.16.04.3 on Ubuntu 16.04 LTS, and before 1.10.1-0ubuntu1.1 on Ubuntu 16.10, and the nginx ebuild before 1.10.2-r3 on Gentoo allow local users with access to the web server user account to gain root privileges via a symlink attack on the error log.
- Severity
- high
- Software
- Nginx
- Fixed in
- 1.10.2-1
- Published
How likely is exploitation
FIRST's Exploit Prediction Scoring System puts the probability of this CVE being exploited in the next 30 days at 4.9% — in the top 8% of all published CVEs. EPSS is an independent forecast of exploitation, not a severity rating: it says nothing about how much damage a successful attack does, which is what a CVSS score measures.
Affected versions
Until: 1.10.2-1
Fixed in: 1.10.2-1
How to fix this CVE
Update Nginx to version 1.10.2-1 or later to remediate a local privilege escalation vulnerability affecting the error log handling mechanism. This vulnerability allows local users with web server privileges to escalate to root by exploiting unsafe symlink handling during log rotation. Immediate patching is recommended for all production systems, especially those where untrusted users have shell access to the web server account.
sudo dnf update nginxDefensia detects this vulnerability
How to check if you are affected
- Step 1: Check the installed Nginx version by running: nginx -v
- Step 2: Compare the version against the vulnerable range (versions before 1.10.2-1 on Debian/Ubuntu systems). Run: dpkg -l | grep nginx (Debian/Ubuntu) or rpm -qa | grep nginx (RHEL/CentOS)
- Step 3: Verify error log file permissions and ownership: ls -la /var/log/nginx/error.log and check for suspicious symlinks using: find /var/log/nginx -type l -ls
- Step 4: After patching, confirm the new version is active: nginx -v and verify the web server has been restarted with: sudo systemctl restart nginx
FAQ
What is CVE-2016-1247?
CVE-2016-1247 is a local privilege escalation vulnerability in Nginx where the error log file handling during log rotation does not properly validate symlink targets, allowing an attacker with web server user privileges to manipulate log files and gain root access.
Is CVE-2016-1247 being actively exploited?
While not listed in active CISA exploitations, public proof-of-concept code exists, making this vulnerability a credible threat for systems with local user access to the web server account.
What versions of Nginx are affected by CVE-2016-1247?
All Nginx versions prior to 1.10.2-1 are affected. This includes 1.6.2-5+deb8u2 and earlier on Debian Jessie, versions before 1.4.6-1ubuntu3.6 on Ubuntu 14.04 LTS, and earlier versions on Ubuntu 16.04 and 16.10.
How do I check if my server is vulnerable to CVE-2016-1247?
Run 'nginx -v' to retrieve your version number. If it is earlier than 1.10.2-1, your system is vulnerable. On Debian/Ubuntu systems, also verify with 'dpkg -l | grep nginx' to confirm the exact package version.
Does Defensia detect CVE-2016-1247?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If Nginx is installed on a monitored server, CVE-2016-1247 will appear in your dashboard with remediation steps.
Related Nginx CVEs
References
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2016-1247. Free for 1 server.
Get started free