home / blog
2026-11-29 · critical
CVE-2012-5958: Critical vulnerability in libupnp
CVE-2012-5958: Stack overflow in libupnp allows remote code execution on systems with UPnP enabled.

CVE-2012-5958 is a stack-based buffer overflow vulnerability in the unique_service_name function in ssdp/ssdp_server.c in the SSDP parser of the portable SDK for UPnP Devices (libupnp). This flaw allows a remote attacker to execute arbitrary code via a specially crafted UDP packet, affecting systems using UPnP with unpatched library versions.
The vulnerability has a CVSS score of 10.0, classifying it as critical. Although published in NVD since 2013, recent signals indicate it's still being used in Docker test environments for crash observation, suggesting it could be exploited in real-world scenarios. The high severity requires attention from system administrators.
In case of legacy systems where updating isn't possible, it's recommended to disable the UPnP service if not strictly necessary. For modern systems, applying the patch by updating to libupnp version 1.6.18 or later is the most effective solution. Network controls to limit access to UDP port 1900 used by SSDP are also recommended.
At a glance
- What
- Stack-based buffer overflow in the unique_service_name function in ssdp/ssdp_server.c in the SSDP parser in libupnp
- Severity
- CVSS 10.0 (critical)
- Affected versions
- libupnp before version 1.6.18
- Fix
- Update to libupnp version 1.6.18 or later
- Status
- Vulnerability published in NVD on 2013-01-31
- Action
- Disable UPnP if not necessary, update to patched libupnp version
Sources: NVD, CVE-2012-5958