high CVSS 7.5 EPSS 4.9% Public exploit available

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 nginx

Defensia detects this vulnerability

How to check if you are affected

  1. Step 1: Check the installed Nginx version by running: nginx -v
  2. 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)
  3. 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
  4. 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

CVE-2009-3555CVSS 10The TLS protocol, and the SSL protocol 3.0 and possibly earlier, as used in Microsoft Internet Information Services (IIS) 7.0, mod_ssl in the Apache HTTP Server 2.2.14 and earlier, OpenSSL before 0.9.8l, GnuTLS 2.8.5 and earlier, Mozilla Network Security Services (NSS) 3.12.4 and earlier, multiple Cisco products, and other products, does not properly associate renegotiation handshakes with an existing connection, which allows man-in-the-middle attackers to insert data into HTTPS sessions, and possibly other types of sessions protected by TLS or SSL, by sending an unauthenticated request that is processed retroactively by a server in a post-renegotiation context, related to a "plaintext injection" attack, aka the "Project Mogul" issue.
CVE-2021-23017CVSS 9A security issue in nginx resolver was identified, which might allow an attacker who is able to forge UDP packets from the DNS server to cause 1-byte memory overwrite, resulting in worker process crash or potential other impact.
CVE-2023-44487CVSS 9The HTTP/2 protocol allows a denial of service (server resource consumption) because request cancellation can reset many streams quickly, as exploited in the wild in August through October 2023.
CVE-2026-42946CVSS 9A vulnerability exists in the ngx_http_scgi_module and ngx_http_uwsgi_module modules that may result in excessive memory allocation or an over-read of data. When scgi_pass or uwsgi_pass is configured, an unauthenticated attacker with man-in-the-middle (MITM) ability to control responses from an upstream server may be able to read the memory of the NGINX worker process or restart it.  Note: Software versions which have reached End of Technical Support (EoTS) are not evaluated.
CVE-2026-60005CVSS 9NGINX Plus and NGINX Open Source have a vulnerability in the ngx_http_slice_module module. When the slice directive and unnamed regex captures are configured or when a background cache update happens, unauthenticated attackers can send requests that may cause uninitialized memory access in the NGINX worker process, leading to limited disclosure of memory or a restart. Impact: This vulnerability may allow remote, unauthenticated attackers to have limited control to disclose memory contents or restart the NGINX worker process. There is no control plane exposure; this is a data plane issue only. Note: The ngx_http_slice_module module is not enabled by default; it's enabled with the --with-http_slice_module configuration parameter. Note: Software versions which have reached End of Technical Support (EoTS) are not evaluated.

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