Cloudanix VulnDB

CVE-2016-1247

High · 7.8

CVSS

7.8

EPSS

4.9%

Published

Nov 29, 2016

CISA due date

—

Cloudanix analysis

Next patch cycle SSVC: Track

A problem in the nginx web server lets someone with limited access take over the whole computer by using a link to trick it into changing important system files.

Exploit Available
Exploitation
Local Privilege
Attacker needs
Low Privilege
Complexity
Low
Impact
Full Compromise
Component
Application
Class
Privilege Escalation
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

Allows local users with access to the nginx web server account to escalate privileges to root via a symlink attack on the configured error log file.

Why it matters to the business

Attackers who already have limited access on affected systems can gain full root control, enabling data theft, persistence, or further compromise across nginx deployments that have remained unpatched for years.

How an attack unfolds

An attacker with access to the nginx user account identifies the error log path, replaces it with a symlink to a root-owned file such as a cron job or shadow file, triggers a write operation through an error condition, and leverages the resulting file modification to execute code as root.

How to fix it

Upgrade nginx packages on all affected distributions to versions that eliminate the symlink vulnerability in error log handling.

How to confirm the fix worked

Confirm nginx is running a patched release, verify that error log paths cannot be replaced with symlinks by non-root users, and audit file creation permissions under the nginx account.

Typical attack path

  1. Obtain access as the nginx web server user account
  2. Locate the configured error log file path
  3. Replace the log path with a symlink pointing to a privileged target file
  4. Induce an error that forces nginx to write to the log
  5. Abuse the overwritten privileged file to achieve root execution

How to detect it

Review nginx error log directories and system audit logs for symlink creations or ownership changes performed by the nginx user account, and look for subsequent root-level processes or file modifications originating from that account.

What your security team should do

  • Prioritize patching all nginx instances to current fixed releases
  • Restrict the nginx service account to the minimum required permissions
  • Enable filesystem protections such as immutable flags on critical log directories
  • Scan systems for unexpected symlinks created by the nginx user

The record

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.

Affected packages

Ecosystem Package Introduced Fixed
Debian:11 nginx 0 1.10.2-1
Debian:12 nginx 0 1.10.2-1
Debian:13 nginx 0 1.10.2-1
Debian:8 nginx 0 1.6.2-5+deb8u3
Ubuntu:14.04:LTS nginx 0 1.4.6-1ubuntu3.6
Ubuntu:16.04:LTS nginx 0 1.10.0-0ubuntu0.16.04.3

Related vulnerabilities