/

CVE-2026-33062

Severity:

HIGH RISK

(7.5)

Improper Input Validation in free5GC NRF Discovery Service

CVE-2026-33062

Analyzed

Vulnerability type

Category:

Improper Input Validation

CWE:

CWE-284

Impact:

Denial of Service

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's Network Repository Function (NRF) discovery service performs improper input validation on the group-id-list query parameter, allowing out-of-range array access during request processing.

A remote attacker can send a crafted HTTP GET request with a malformed group-id-list value, causing the NRF process to panic and crash, resulting in denial of service for all dependent discovery operations.

Affected context

The vulnerability occurs in the free5GC NRF component when handling discovery requests that use the group-id-list query parameter.

Specifically, the EncodeGroupId function assumes that splitting the parameter on separator characters will produce at least three elements, and then unconditionally accesses indices [0], [1], and [2].

Any deployment that exposes the NRF discovery API, including internal service meshes or externally reachable control-plane endpoints, may be affected if malformed parameters are not filtered or validated upstream.

Exploit preconditions

  • Attack surface: HTTP-based NRF discovery API endpoint.
  • Required access: Ability to send HTTP GET requests to the NRF service (e.g., from another network function, sidecar, or any client that can reach the NRF API).
  • Trigger point: Processing of a discovery request where the group-id-list query parameter is present but contains insufficient separator characters, resulting in fewer than three elements after splitting.
  • Why exploitation is possible: The EncodeGroupId function uses array indices [0], [1], and [2] on the split result without checking its length, allowing an out-of-range index access that causes a runtime panic and service crash.

Why this happens

At its core, this issue is an improper input validation problem in the request-handling logic for the NRF discovery service.

The group-id-list parameter is treated as structurally well-formed, and the code assumes that splitting the string on a delimiter will always yield at least three segments.

This violates robust defensive coding practices: external input is not validated for expected structure, length, or bounds before being used.

The resulting out-of-range index access leads to a runtime panic, which in Go terminates the process unless explicitly recovered, mapping to improper input handling that enables denial of service.

Potential impact

  • The NRF discovery service can crash and become unavailable.
  • Dependent 5G core network functions may be unable to discover or register services.
  • Service registration and discovery failures can disrupt session establishment and mobility procedures.
  • An attacker could repeatedly trigger crashes to maintain a persistent denial of service against the control plane.

General mitigation guidance

Mitigation generally focuses on enforcing strict validation of all externally supplied parameters before they are used in indexing or parsing logic, and on hardening the service against panics.

Useful defensive patterns include:

  • Validating the structure and format of query parameters such as group-id-list before processing, including checking the number of segments after splitting and rejecting malformed input early.
  • Using defensive coding practices to verify slice or array bounds before accessing specific indices and handling unexpected lengths gracefully.
  • Introducing input schemas or contracts (for REST or OpenAPI-based interfaces) and enforcing them at the API boundary to prevent structurally invalid requests from reaching core logic.
  • Adding centralized error handling and recovery mechanisms around request-handling paths to prevent a single malformed request from terminating the entire service.
  • Applying network-layer or service-mesh policies to restrict access to the NRF API to trusted components and to rate-limit potentially abusive traffic patterns.

How teams detect issues like this

Organizations can detect and monitor for this class of issue through a combination of code-level and operational controls:

  • Static analysis or linters configured to flag unchecked slice or array indexing that depends on external input, especially around parsing and splitting routines.
  • Code reviews that pay particular attention to request handlers, ensuring that all query/path/body parameters are validated for length and structure before use.
  • Runtime monitoring and logging for panic events in the NRF process, correlating spikes in crashes with specific request patterns or parameters (e.g., malformed group-id-list).
  • API gateway or service mesh logs that track unusual or repeated malformed requests targeting discovery endpoints, which may indicate active probing or exploitation attempts.

Sources

SourceLink
github.comgithub.com/free5gc/free5gc/issues/777
github.comgithub.com/free5gc/free5gc/security/advisories/GHSA-7c47-xr7q-p6hg
github.comgithub.com/free5gc/nrf/commit/dac77d8f8f2e0f041c5634fb3c685dcb9734b872
github.comgithub.com/free5gc/nrf/pull/80

Frequently asked

questions

Yes. Any actor that can send HTTP GET requests to the NRF discovery API and include a crafted group-id-list parameter can attempt to exploit this vulnerability to crash the service.

The attacker needs network-level access to the NRF discovery endpoint. This could be from within the same Kubernetes cluster, a service mesh, or any environment where the NRF API is reachable; no additional authentication bypass is described for triggering the crash.

The safest pattern is to comprehensively validate all externally controlled inputs before use, especially when splitting strings or indexing into slices. Ensure that functions like EncodeGroupId verify the length and format of parsed data, handle malformed input gracefully, and avoid assumptions about parameter structure.

Adopt a defensive coding standard that mandates bounds checks before indexing, enforce strict API contracts with validation at the boundary, and integrate static analysis and focused code review practices specifically aimed at input parsing and error handling in network-exposed components.

Find out what's already
exploitable in your codebase.