Cloudanix VulnDB

CVE-2016-6255

High · 7.5

CVSS

7.5

EPSS

26.6%

Published

Mar 7, 2017

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

A long-standing bug in a common networking library lets outsiders place harmful files on a device or server without permission, which could let them take control or damage the system.

Exploit Available
Exploitation
Remote Unauthenticated
Attacker needs
None
Complexity
Low
Impact
Data Tampering
Component
Library
Class
Path Traversal
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

The flaw permits an unauthenticated remote attacker to perform an unauthenticated file write into the webroot directory by issuing a POST request that targets an unregistered handler, bypassing normal path validation.

Why it matters to the business

Attackers can place malicious or unauthorized files on exposed systems, enabling website defacement, backdoor installation, or further compromise of any service that serves content from the webroot; the issue has been public for years with working exploits available.

How an attack unfolds

An attacker locates a device or application embedding the vulnerable UPnP library, crafts a POST request containing path traversal sequences aimed at an unregistered handler, and writes arbitrary content directly into the webroot; once written, the attacker can reference the new file via HTTP to achieve code execution or persistence.

How to fix it

Upgrade the Portable UPnP SDK (libupnp) to version 1.6.21 or later; where packaged products are in use, apply the vendor-supplied fixed builds that incorporate this change.

How to confirm the fix worked

Confirm the running library version is at least 1.6.21 by inspecting package metadata, binary strings, or build manifests; re-test by attempting a POST to an unregistered handler and verifying that writes outside the intended directory are rejected.

Typical attack path

  1. Scan for hosts exposing UPnP/SSDP services or embedded web servers using the vulnerable library
  2. Send a crafted POST request with directory traversal in the URI or headers to an unregistered handler
  3. Write attacker-controlled content into an arbitrary file under the webroot
  4. Access the newly created file over HTTP to trigger malicious behavior or maintain access

How to detect it

Review web server and application logs for unexpected POST requests to paths that do not correspond to registered handlers; look for sudden appearance of new files in webroot directories that were not deployed through normal change processes.

What your security team should do

  • Immediately inventory all systems and containers that embed libupnp and schedule upgrades to the fixed versions
  • Block or restrict inbound POST requests to UPnP endpoints from untrusted networks until patches are applied
  • Monitor public exploit repositories for active proof-of-concept code and raise alerting thresholds accordingly

The record

Portable UPnP SDK (aka libupnp) before 1.6.21 allows remote attackers to write to arbitrary files in the webroot via a POST request without a registered handler.

Affected packages

Ecosystem Package Introduced Fixed
Debian:7 libupnp 0 1:1.6.17-1.2+deb7u1
Debian:8 libupnp 0 1:1.6.19+git20141001-1+deb8u1
Mageia:5 libupnp 0 1.6.19-4.1.mga5
Ubuntu:14.04:LTS libupnp 0 1:1.6.17-1.2+deb7u1build0.14.04.1
Ubuntu:18.04:LTS libupnp 0 1:1.6.22-1
Ubuntu:Pro:16.04:LTS libupnp 0 1:1.6.19+git20160116-1ubuntu0.1~esm1

Related vulnerabilities