/

CVE-2026-27642

Severity:

HIGH RISK

(7.5)

Improper Input Validation in free5GC UDM Nudm_UEAU Service

CVE-2026-27642

Analyzed

Vulnerability type

Category:

Improper Input Validation

CWE:

CWE-20

Impact:

Information Disclosure and Service Fingerprinting

Severity:

HIGH RISK

(7.5)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

free5GC UDM versions up to and including 1.4.1 insufficiently validate the supi parameter, allowing remote attackers to inject control characters such as %00.

This malformed input triggers internal URL parsing errors (net/url: invalid control character), causing detailed system error messages to be exposed, which can aid in service fingerprinting and reconnaissance.

Affected context

The vulnerability appears in the Unified Data Management (UDM) component of free5GC when handling requests to the Nudm_UEAU service.

Deployments are affected when:

  • The UDM HTTP endpoints are reachable over the network (e.g., from other 5GC components or untrusted network segments).
  • Incoming supi parameters can contain unvalidated, attacker-controlled data.
  • The service forwards or embeds the supi value into internal URLs or request contexts without sanitization.

Under these conditions, crafted control characters in supi can cause low-level URL parsing errors that are propagated back in error responses.

Exploit preconditions

  • Attack surface: Network-exposed UDM Nudm_UEAU API endpoints.
  • Required access: Ability to send HTTP(S) requests to the UDM (no special privileges beyond network reachability).
  • Trigger point: Supplying a supi value containing control characters (e.g., %00 or similar) in Nudm_UEAU requests.
  • Why exploitation is possible: The service performs inadequate validation/normalization on supi before using it in URL construction or parsing, allowing invalid characters to reach net/url parsing logic and generate detailed error responses.

Why this happens

The underlying issue is an Improper Input Validation (CWE-20) of the supi parameter in the UDM Nudm_UEAU service.

Instead of enforcing strict syntax rules and character whitelists for supi, the application accepts arbitrary input and later passes it into URL-related APIs.

Control characters, such as the null byte (%00), are not filtered or rejected, leading the standard net/url parser to fail with explicit, system-level error messages.

This pattern illustrates a common bug class where untrusted input is used in lower-level protocol or URL handling without normalization, sanitation, or defensive error handling, leaking internal implementation details.

Potential impact

  • Attackers can trigger verbose URL parsing errors that expose internal error messages and stack traces.
  • Adversaries may fingerprint the free5GC UDM implementation, version, and underlying libraries based on error formats and messages.
  • Error responses can reveal internal paths, code modules, or configuration details that could aid subsequent attacks.
  • Repeated malformed requests might contribute to log noise or minor resource consumption, potentially amplifying other denial-of-service vectors.

General mitigation guidance

Effective mitigation centers on strict input validation and defensive error handling:

  • Apply allowlist-based validation for supi values, enforcing the expected 5G identifier format and rejecting any control characters or disallowed bytes before further processing.
  • Normalize and canonicalize identifiers before passing them into URL builders, routers, or downstream services.
  • Avoid reflecting raw parsing error messages from lower-level libraries (such as net/url) directly to clients; instead, map them to generic, minimal error responses.
  • Implement centralized input validation routines for all external parameters that may be used in URL construction, routing, or protocol handling.
  • Configure logging so that detailed error diagnostics are retained server-side only, with client responses limited to non-sensitive summaries.

How teams detect issues like this

Detection can rely on both code-centric and behavior-centric approaches:

  • Static analysis and code review:
  • Search for code paths that accept supi from HTTP requests and pass it to URL constructors or parsers without explicit validation.
  • Flag any use of user-controlled identifiers in net/url APIs, route builders, or HTTP proxies where no sanitization occurs.
  • Review error handling logic to identify places where raw error messages or stack traces are returned to clients.
  • Dynamic testing and fuzzing:
  • Use API fuzzers to send supi values containing control characters, malformed encodings, and protocol edge cases to Nudm_UEAU endpoints and observe responses.
  • Monitor for HTTP responses containing explicit internal error strings like net/url: invalid control character.
  • Operational monitoring:
  • Implement WAF or API gateway rules to detect and optionally block requests containing control characters in query parameters or path segments.
  • Analyze logs for repeated URL parsing errors tied to malformed supi input patterns.

Sources

SourceLink
github.comgithub.com/free5gc/free5gc/issues/749
github.comgithub.com/free5gc/free5gc/security/advisories/GHSA-h4wg-rp7m-8xx4
github.comgithub.com/free5gc/udm/commit/a7af2321ddea6368c43835f90f6d1b9d67dd2ea1
github.comgithub.com/free5gc/udm/pull/75

Frequently asked

questions

Yes. Any remote party that can reach the UDM Nudm_UEAU service over the network can attempt to exploit it by sending crafted supi values.

Typically, no. As long as the relevant Nudm_UEAU endpoint is reachable and accepts supi parameters from the requester, the attacker does not require elevated privileges to induce the parsing errors.

Implement strict, centralized validation for supi that enforces its expected format and character set, reject requests containing control characters or invalid encodings, and ensure internal parsing errors are handled and logged without exposing raw error details to clients.

Adopt a systematic input validation strategy (preferably allowlist-based) for all externally supplied identifiers, combine it with defensive error handling that avoids leaking internal details, and integrate security-focused code review and automated testing (including fuzzing) into the development lifecycle for protocol-facing components.

Find out what's already
exploitable in your codebase.