Skip to main content

pupnp SDK CVE-2026-41682

MEDIUM
Signed to Unsigned Conversion Error (CWE-195)
2026-05-08 GitHub_M
6.9
CVSS 4.0 · GitHub Advisory
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Supply crafted URI with port > 65535
  2. Delivery
    parse_uri() passes value to atoi()
  3. Exploit
    Integer truncation wraps port to low-numbered value
  4. Install
    parse_hostport() accepts wrapped port without validation
  5. C2
    Application initiates connection to unintended port
  6. Execute
    Bypass port-based access controls
  7. Impact
    Access restricted internal service

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Signed/unsigned conversion safety
Exploitation Conditions

The vulnerable code path is triggered whenever pupnp's parse_uri() processes a URI containing a port component with a value outside the valid 16-bit range (1-65535). In practice, this requires an attacker to control URI input that reaches parse_hostport() - for example, UPnP SUBSCRIBE callback URLs submitted by a control point, location headers in UPnP discovery (SSDP) responses, or control URLs in UPnP device description XML. Exploitation is limited to pupnp-based applications acting as UPnP control points or otherwise consuming externally supplied URIs with port components; purely passive UPnP device implementations that do not process callback/location URIs from untrusted peers have a reduced but not eliminated attack surface. The CVSS 4.0 vector PR:N/UI:N/AV:N confirms no authentication or user interaction is required when attacker-controlled URI input is reachable over the network.

Impact

The CVSS 4.0 score of 6.9 with AV:N/AC:L/PR:N/UI:N reflects a network-accessible, low-complexity, unauthenticated path to partial confidentiality and integrity impact. However, real-world exploitation risk is substantially below what that score implies. EPSS is 0.04% at the 12th percentile - near the floor of known CVEs - indicating negligible observed exploitation activity. CISA SSVC confirms exploitation status as 'none' while noting the attack is automatable, a combination that suggests the precondition (attacker-controlled URI input reaching parse_uri) limits practical reach even though exploitation mechanics themselves are straightforward. No KEV listing corroborates the absence of active campaigns. The key tension is SSVC 'automatable: yes' against EPSS near zero - this likely reflects that exploitation is easy once the precondition is met, but the precondition (externally supplied URIs processed by a pupnp control point) is not universally present. Defenders should prioritize patching in deployments where the application processes callback URLs or location headers from untrusted UPnP peers.

Exploit ScenarioDerived

An attacker sends a crafted UPnP SUBSCRIBE callback URI or device description location URL containing a port value such as 65537 to an application built on pupnp. The atoi() call in parse_hostport() produces a value that wraps to 1 after integer truncation, causing the UPnP control point to initiate a connection to port 1 on a target host rather than the stated port 65537. This bypasses port-based firewall rules or security checks that would have blocked access to the low-numbered port, potentially exposing internal administrative or legacy services. No public exploit code has been identified at time of analysis.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jul 24, 2026

Port confusion in pupnp's URI parser allows remote unauthenticated attackers to bypass port-based access controls by supplying port values exceeding 65535 in crafted URIs. The integer truncation caused by atoi() in parse_hostport() within uri.c causes the parsed port to wrap around (e.g., port 65537 resolves to port 1), enabling SSRF-style redirection to unintended internal services. All pupnp releases prior to 1.18.5 are affected; no confirmed active exploitation exists (EPSS 0.04%, no KEV listing), but SSVC rates the attack as automatable with partial technical impact.

RemediationAI

Upgrade pupnp to version 1.18.5, the confirmed patched release available at https://github.com/pupnp/pupnp/releases/tag/release-1.18.5, which introduces strtol()-based port parsing with explicit 1-65535 range validation in parse_hostport(). The underlying commit is https://github.com/pupnp/pupnp/commit/def5f9a2bc42f5b3d713e37c516fbe840ce54b7b. For deployments that cannot immediately upgrade, a compensating control is to validate and reject port values outside the 1-65535 range in application code before passing URIs to pupnp's parse_uri() - note this adds application-layer logic that must be maintained across future pupnp updates. Network-level egress filtering to block outbound connections from UPnP services to privileged ports (1-1023) can reduce the blast radius of successful exploitation but does not prevent the underlying integer confusion.

Affects your stack

Find out whether the stacks and servers you run are on an affected version.

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The vulnerability (CWE-195: Signed to Unsigned Conversion Error) resides in parse_hostport() in upnp/src/genlib/net/uri/uri.c. The original code used atoi() to convert port strings from incoming URIs to integers. atoi() performs no range validation and its return value, when subsequently stored in or compared against a 16-bit unsigned port type, wraps modulo 65536 - so a supplied port of 65537 is silently treated as port 1. The fix (commit def5f9a2) replaces atoi() with strtol() and adds explicit bounds checking (1-65535), returning UPNP_E_INVALID_URL for out-of-range values. Affected CPE is cpe:2.3:a:pupnp:pupnp:*:*:*:*:*:*:*:* covering all versions prior to 1.18.5. pupnp (libupnp) is the reference open-source UPnP SDK embedded in many IoT devices, media servers, and smart home software.

Know when Pupnp gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

GitHub Advisory PRIMARY 6.9 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N
vuln.today AI 6.5 MEDIUM

Network-reachable URI parsing with no auth or interaction required; impact limited to partial SSRF-style port confusion affecting confidentiality and integrity only.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N

Primary rating from GitHub Advisory.

CVSS VectorGitHub Advisory

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
Low
Vulnerable system: Integrity
Low
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
CVSS changed
May 08, 2026 - 23:22 NVD
6.9 (MEDIUM)
CVE Published
May 08, 2026 - 22:47 nvd
MEDIUM 6.9

DescriptionGitHub Advisory

pupnp is an SDK for development of UPnP device and control point applications. Prior to version 1.18.5, pupnp is vulnerable to SRRF port confusion due to port truncation via atoi() cast in parse_uri(). This issue has been patched in version 1.18.5.

Threat Intelligence Overview

EPSS Score
0.0%
Top 88% exploitable
Prevalence
Medium
common in IoT firmware, routers, and UPnP media servers
Data Quality
6 sources
Confidence: High
NVD CVE.org EPSS Vulnrichment Vendor GitHub

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
Yes
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

34
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +34
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

Affected Products (CPE)GitHub Advisory

cpe:2.3:a:pupnp:pupnp:*:*:*:*:*:*:*:*

Vendor StatusVendor

SUSE

Product Status
openSUSE Tumbleweed Fixed

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy