Security Advisory

CVE-2019-12107: MiniUPnPd Event Heap Info Leak

Last updated:
  • CVE-2019-12107

CVE-2019-12107 is an information leak in upnp_event_prepare() in MiniUPnPd through 2.1: the daemon trusts the return value of snprintf() when it builds a UPnP event message (CWE-252), so a remote attacker can make it send heap memory. NVD scores it 7.5. MiniUPnPd 2.2.0 is the first release with the fix.

Vulnerability summary

CVSS base score

7.5

High severity

EPSS score (FIRST)

3.0%

Probability of exploitation in the wild in the next 30 days

CISA KEV catalog

No

Not listed

Published

Vulnerability ID: CVE-2019-12107 · Source: NVD

Affected components

ComponentCPEVersion range
MiniUPnPd (MiniUPnP IGD daemon)cpe:2.3:a:miniupnp.free:miniupnpd:*:*:*:*:*:*:*:*through 2.1 (NVD; vendor string miniupnp.free); fix dated 2018/12/18, first release 2.2.0 (2020/10/31)
OpenWrt packages feed: miniupnpdcpe:2.3:a:miniupnp.free:miniupnpd:*:*:*:*:*:*:*:*openwrt-18.06: 2.1 with a build patch only; openwrt-19.07: 2.2.0; master 2.3.11 (read 2026-11-18)
Debian miniupnpd—fixed in 1.8.20140523-4+deb8u1 (jessie, DLA-1811-1), 1.8.20140523-4.1+deb9u2 (stretch) and 2.1-6 (unstable)

What does this mean for affected devices?

NVD's description: "The upnp_event_prepare function in upnpevents.c in MiniUPnP MiniUPnPd through 2.1 allows a remote attacker to leak information from the heap due to improper validation of an snprintf return value." NVD's Primary score is CVSS v3.0 7.5 (CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N), with CVSS v2 5.0 and CWE-252 (Unchecked Return Value). The CPE configuration covers MiniUPnPd through 2.1 under the vendor name miniupnp.free, while the sibling CVE-2019-12111 uses miniupnp_project, so a scanner keyed to one CPE vendor misses the other. The record was published on 2019-05-15 (NVD).

How does the leak work?

UPnP eventing (GENA) lets a control point subscribe to state changes; the daemon then sends NOTIFY messages to the callback URL from the subscription. In the 2.1 source from the MiniUPnP download page, upnp_event_prepare() allocates a 1,024-byte buffer, formats the message into it with snprintf(), including the callback path and the XML state variables, and stores the return value as the number of bytes to send. snprintf() returns the length the full message would have had, so when it does not fit, the daemon sends the buffer and the heap memory behind it. The 2.1 genconfig.sh enables event support by default. The project Changelog entry of 2018/12/18 reads "upnp_event_prepare(): check the return value of snprintf()"; MiniUPnPd 2.1 was released on 2018/05/08 and 2.2.0 on 2020/10/31, so 2.2.0 is the first release with the fix.

Which firmware carries it?

The OpenWrt packages feed packaged MiniUPnPd 2.1 on openwrt-18.06 with only a build patch, moved to 2.2.0 on openwrt-19.07, and builds 2.3.11 on master as of 2026-11-18. Debian patched its older 1.8.20140523 package instead of upgrading: jessie in DLA-1811-1 and stretch in 1.8.20140523-4.1+deb9u2, per the Debian security tracker. A 1.8 build can therefore be fixed while a vanilla 2.1 build is not, so check the vendor's patch list as well as the version. Our MiniUPnPd and UPnP firmware guide lists the MiniUPnPd CVEs by release.

How do you fix or mitigate it?

Upgrade to a current MiniUPnPd release; 2.2.0 and later also include the PCP fix for CVE-2019-12111. Where that is not possible, apply the 2018/12/18 change and keep the daemon's HTTP port, where subscriptions arrive, unreachable from WAN. Older MiniUPnPd builds also carry CVE-2013-0229 and CVE-2013-0230, and the memory corruption fix guide covers length checks of this kind.

CVE-2019-12107 is not in the CISA KEV catalog as of 2026-11-18 (catalog version 2026.11.17). FIRST EPSS gives it 0.03034, the 88th percentile, in the 2026-11-17 dataset (CISA KEV, FIRST EPSS).

How to fix this class of issueNo dedicated SoftWSP guide covers this weakness class; the fix is usually the vendor patch or firmware update referenced above. Our related guide explains how to plan and verify it: NIST SP 800-40 Rev. 4: enterprise patch management planning, explained.

Evidence

  • NVD: upnp_event_prepare in upnpevents.c in MiniUPnPd through 2.1, heap information leak due to improper validation of an snprintf return value; Primary CVSS v3.0 7.5 C:H, v2 5.0; CWE-252; CPE cpe:2.3:a:miniupnp.free:miniupnpd through 2.1; published 2019-05-15. — NVD
  • MiniUPnPd Changelog: 2018/12/18 'upnp_event_prepare(): check the return value of snprintf()'; VERSION 2.1 released 2018/05/08; VERSION 2.2.0 released 2020/10/31. — MiniUPnP project (GitHub)
  • miniupnpd-2.1.tar.gz upnpevents.c: buffersize = 1024; obj->tosend = snprintf(obj->buffer, obj->buffersize, notifymsg, obj->path, ...); genconfig.sh defines ENABLE_EVENTS. — MiniUPnP download page
  • OpenWrt packages net/miniupnpd: 2.1 on openwrt-18.06 (patches: 100-build-on-OpenWrt.patch only), 2.2.0 on openwrt-19.07, 2.3.11 on master; read 2026-11-18. — OpenWrt packages
  • Debian security tracker: miniupnpd fixed in jessie 1.8.20140523-4+deb8u1 (DLA-1811-1), stretch 1.8.20140523-4.1+deb9u2, unstable 2.1-6 (bug 930050). — Debian security tracker
  • CVE-2019-12107 is not in the CISA KEV catalog, version 2026.11.17 (1,782 entries), checked 2026-11-18. — CISA KEV
  • EPSS 0.03034, percentile 0.87728, dataset 2026-11-17. — FIRST EPSS

Related advisories

Sources

  1. NVD
  2. MiniUPnPd Changelog
  3. MiniUPnP project: release downloads
  4. OpenWrt packages: miniupnpd Makefile (openwrt-18.06)
  5. Debian security tracker
  6. CISA KEV
  7. FIRST EPSS

Frequently asked questions

Which MiniUPnPd versions are affected by CVE-2019-12107?

NVD lists MiniUPnPd through 2.1. The project's Changelog records the snprintf() check on 2018/12/18, after 2.1 shipped on 2018/05/08, and 2.2.0 of 2020/10/31 is the first release with it. Debian backported the fix to its 1.8.20140523 packages (per NVD, the MiniUPnPd Changelog and the Debian security tracker).

What data can CVE-2019-12107 leak?

Heap memory that follows the 1,024-byte event message buffer in the daemon's process. In the 2.1 source the length snprintf() would have needed is used as the send length, so the bytes after the buffer go to the event subscriber (per NVD and the MiniUPnPd 2.1 source).

Why might a scanner miss CVE-2019-12107 or CVE-2019-12111 on the same build?

NVD files CVE-2019-12107 under the CPE vendor miniupnp.free and CVE-2019-12111 under miniupnp_project. A tool that maps the component to only one of these vendor names reports only one of the two CVEs (per NVD).

Is CVE-2019-12107 in the CISA KEV catalog?

No, not as of 2026-11-18 (catalog version 2026.11.17). FIRST EPSS gives it 0.03034, the 88th percentile, in the 2026-11-17 dataset (per CISA KEV and FIRST EPSS).