Security Advisory

CVE-2021-29462: pupnp Host Header DNS Rebinding

Last updated:
  • CVE-2021-29462

CVE-2021-29462 is a DNS-rebinding flaw in pupnp (libupnp), the Portable SDK for UPnP Devices, before 1.14.6: its server does not check the HTTP Host header, so a web page opened on the LAN can call the device's UPnP services or read its media. NVD scores it 9.8, GitHub 7.6. pupnp 1.14.6 fixes it.

Vulnerability summary

CVSS base score

9.8

Critical severity

EPSS score (FIRST)

0.6%

Probability of exploitation in the wild in the next 30 days

CISA KEV catalog

No

Not listed

Published

Vulnerability ID: CVE-2021-29462 · Source: NVD

Affected components

ComponentCPEVersion range
Portable SDK for UPnP Devices (pupnp, libupnp)cpe:2.3:a:pupnp_project:pupnp:*:*:*:*:*:*:*:*all versions before 1.14.6 (GitHub advisory; NVD: up to, excluding, 1.14.6); fixed in 1.14.6
OpenWrt packages feed: libupnpcpe:2.3:a:pupnp_project:pupnp:*:*:*:*:*:*:*:*openwrt-21.02 packages 1.14.0 with no patch directory; master, openwrt-24.10 and openwrt-25.12 package 1.14.18 (read 2026-11-18)
Debian pupnp-1.8—bookworm 1:1.8.4-2 listed as vulnerable (ignored, minor issue); Debian's pupnp 1.14 and later packages not affected (read 2026-11-18)

What does this mean for affected devices?

NVD's description: the server part of pupnp "appears to be vulnerable to DNS rebinding attacks because it does not check the value of the Host header. This can be mitigated by using DNS revolvers which block DNS-rebinding attacks. The vulnerability is fixed in version 1.14.6 and later." NVD's Primary score is CVSS v3.1 9.8 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H) with CWE-345 (Insufficient Verification of Data Authenticity). GitHub, the CNA, gives 7.6 (AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:L) with CWE-20, which reflects the user interaction the attack needs. The CPE configuration covers pupnp before 1.14.6. The record was published on 2021-04-20 (NVD).

What can an attacker do with it?

The project's GitHub advisory GHSA-6hqq-w3jq-9fhg lists all versions before 1.14.6 as affected and says "a remote web server can exploit this vulnerability to trick the user browser into triggering actions on the local UPnP services implemented using this library." Its example is exfiltrating "the content of the media files exposed by a UPnP AV MediaServer server", and it adds that deleting or uploading files may be possible where the server configuration allows it. The attacker needs a victim on the same LAN to open a web page, which is why the CNA scores user interaction as required. Gabriel Corona announced the fix on oss-security.

What does pupnp 1.14.6 change?

The release-1.14.5 to release-1.14.6 diff checks the Host header of every request to the miniserver. A request without one is rejected, and a request whose Host is not a numeric IPv4 or IPv6 address is rejected ("Possible DNS Rebind attack prevented") unless the application has registered a callback with UpnpSetHostValidateCallback() that accepts the name, or has turned on UpnpSetAllowLiteralHostRedirection(), off by default, which answers with a 307 redirect to the numeric address. A product that is reached by host name needs one of these two calls after the upgrade. The ChangeLog entry dated 2021-04-19 reads "Fix for a DNS Rebind exploit."

Which firmware carries it?

On 2026-11-18 OpenWrt's packages feed builds libupnp 1.14.18 on master, openwrt-24.10 and openwrt-25.12, and Buildroot's libupnp package builds 1.14.25. The openwrt-21.02 branch packaged 1.14.0 with no patches. The Debian security tracker lists bookworm's pupnp-1.8 package, 1:1.8.4-2, as vulnerable and marked minor, so firmware built on the 1.8 API line keeps the flaw. Older libupnp code also has the SUBSCRIBE overflow CVE-2016-8863 and the SSDP overflow CVE-2012-5958. Our MiniUPnPd and UPnP firmware guide ranks it as reachable through a LAN browser.

How do you mitigate it without upgrading?

The advisory's workaround is a DNS resolver that blocks rebinding, that is, one that refuses public names resolving to private addresses. Inside the product, check the Host header against the device's own addresses before handling a request, as 1.14.6 does. Protocol-level UPnP abuse such as CallStranger, CVE-2020-12695, needs separate handling.

CVE-2021-29462 is not in the CISA KEV catalog as of 2026-11-18 (catalog version 2026.11.17). FIRST EPSS gives it 0.00627, the 51st 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: pupnp server part vulnerable to DNS rebinding, no Host header check; mitigated by DNS resolvers blocking rebinding; fixed in 1.14.6; Primary CVSS v3.1 9.8, CWE-345; GitHub (CNA) CVSS v3.1 7.6 AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:L, CWE-20; CPE pupnp before 1.14.6; published 2021-04-20. — NVD
  • GHSA-6hqq-w3jq-9fhg: affected all, patched 1.14.6; impact text on browser-triggered actions and UPnP AV MediaServer exfiltration, file delete/upload if enabled; workaround DNS resolvers that block DNS rebinding. — pupnp GitHub advisory
  • oss-security 2021-04-20, Gabriel Corona: DNS rebinding vulnerability in pupnp, fixed in v1.14.6, CVE-2021-29462. — oss-security
  • release-1.14.5...release-1.14.6: miniserver.c rejects requests without Host and with non-numeric Host unless UpnpSetHostValidateCallback accepts or UpnpSetAllowLiteralHostRedirection (default 0) sends a 307 redirect; ChangeLog 2021-04-19 'Fix for a DNS Rebind exploit.' — pupnp project (GitHub)
  • OpenWrt packages libs/libupnp: 1.14.18 on master, openwrt-24.10, openwrt-25.12; 1.14.0 on openwrt-21.02 with no patches directory; Buildroot libupnp 1.14.25; read 2026-11-18. — OpenWrt packages / Buildroot
  • Debian security tracker: pupnp-1.8 bookworm 1:1.8.4-2 vulnerable, ignored (minor issue); pupnp not affected. — Debian security tracker
  • CVE-2021-29462 is not in the CISA KEV catalog, version 2026.11.17 (1,782 entries), checked 2026-11-18. — CISA KEV
  • EPSS 0.00627, percentile 0.50669, dataset 2026-11-17. — FIRST EPSS

Related advisories

Sources

  1. NVD
  2. pupnp security advisory GHSA-6hqq-w3jq-9fhg
  3. oss-security: DNS rebinding vulnerability in pupnp (2021-04-20)
  4. pupnp release-1.14.5 to release-1.14.6 changes
  5. OpenWrt packages: libupnp Makefile (openwrt-21.02)
  6. Buildroot: libupnp package
  7. Debian security tracker
  8. CISA KEV
  9. FIRST EPSS

Frequently asked questions

Which pupnp versions are affected by CVE-2021-29462?

All versions before 1.14.6, per the project's GitHub advisory; NVD's CPE range is the same. The 1.8.x line is affected too: Debian lists bookworm's pupnp-1.8 package 1:1.8.4-2 as vulnerable (per GHSA-6hqq-w3jq-9fhg, NVD and the Debian security tracker).

Why do NVD and GitHub score CVE-2021-29462 differently?

NVD's 9.8 assumes no privileges and no user interaction. GitHub, the CNA, scores 7.6 with low privileges and user interaction required, because a user on the LAN has to open the attacker's web page in a browser (per NVD).

Can upgrading to pupnp 1.14.6 break a device that is reached by host name?

It can. From 1.14.6 the server rejects requests whose Host header is not a numeric IP address unless the application accepts the name through UpnpSetHostValidateCallback() or enables UpnpSetAllowLiteralHostRedirection(), which is off by default (per the pupnp 1.14.6 source).

Is CVE-2021-29462 in the CISA KEV catalog?

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