CVE Professor
/
All CVEs
CVE-2026-138052

CVE-2026-138052 — Openairinterface Oai-cn5g-amf — CWE-404

MEDIUM CVSS 5.3 Shodan

A vulnerability was detected in OpenAirInterface oai-cn5g-amf up to 2.2.2. Impacted is the function amf_sbi::discover_smf of the file src/amf-app/amf_sbi.cpp of the component AMF. The manipulation results in denial of service. The attack can be executed remotely. The exploit is now public and may be used. The patch is identified as 1eabe18bf0cb5a248e0429f4daac91dee51c8a43. It is best practice to apply a patch to resolve this issue.

A vulnerability was detected in OpenAirInterface oai-cn5g-amf up to 2.2.2. Impacted is the function amf_sbi::discover_smf of the file src/amf-app/amf_sbi.cpp of the component AMF. The manipulation results in denial of service. The attack can be executed remotely. The exploit is now public and may be used. The patch is identified as 1eabe18bf0cb5a248e0429f4daac91dee51c8a43. It is best practice to apply a patch to resolve this issue.

CVSS v3.1 Vector Metrics
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Attack Vector Network AV:N
Attack Complexity Low AC:L
Privileges Req. None PR:N
User Interaction None UI:N
Scope Unchanged S:U
Confidentiality None C:N
Integrity None I:N
Availability Low A:L
AI Security Analysis & Remediation

🎯 What is this vulnerability?

This vulnerability is a Denial of Service (DoS) flaw classified under CWE-404: Improper Resource Shutdown or Release. It affects the OpenAirInterface (OAI) 5G Core Network implementation, specifically the Access and Mobility Management Function (AMF) component (oai-cn5g-amf) in versions up to and including 2.2.2.

Technical Flaw Analysis:
The vulnerability resides in the function amf_sbi::discover_smf within the file src/amf-app/amf_sbi.cpp. In 5G Core architectures, the AMF communicates with the Session Management Function (SMF) via the Service-Based Interface (SBI), which uses HTTP/2 and JSON over TLS.

The discover_smf function is responsible for locating an available SMF instance, typically by querying the Network Repository Function (NRF) or handling local discovery logic. The "Improper Resource Shutdown or Release" classification suggests that during the discovery process, the AMF fails to properly release resources (such as memory buffers, file descriptors, or network sockets) under specific conditions.

Given the CVSS vector (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L), the flaw allows an unauthenticated remote attacker to trigger a state where resources are leaked or exhausted, leading to a Low Availability impact. This likely manifests as:
1. Memory Leak: Repeated calls to discover_smf with malformed or specific triggering inputs cause memory to accumulate without being freed, eventually leading to an Out-Of-Memory (OOM) condition and process crash.
2. Socket/Descriptor Leak: The function may open network connections or file descriptors for discovery that are not closed on error paths or specific race conditions, leading to resource exhaustion.
3. Infinite Loop/Deadlock: While less likely for CWE-404, improper shutdown logic could lead to a hang in the discovery thread, blocking the AMF's main event loop.

The attack requires no privileges (PR:N) and no user interaction (UI:N), indicating that the vulnerable endpoint is exposed to the network without authentication, or that the discovery mechanism can be triggered by unauthenticated network traffic (e.g., via the NRF interface or a misconfigured SBI endpoint).

⚡ Attack Chain

1. Discovery & Reconnaissance

  • Target Identification: The attacker identifies a 5G Core network deployment using OpenAirInterface. This can be done via:
  • * Banner Grabbing: Scanning for HTTP/2 services on ports typically used for 5G SBI (e.g., 8080, 8443, or custom ports). The User-Agent or Server headers might reveal oai-cn5g-amf or OpenAirInterface. * NRF Query: If the NRF is exposed, querying it for registered AMF instances can reveal the AMF's IP and port. * Version Fingerprinting: Checking the version string in API responses or error messages to confirm it is ≤ 2.2.2.
  • Endpoint Mapping: The attacker identifies the SBI endpoint responsible for SMF discovery. In OAI, this is likely part of the AMF's internal service interface or exposed via the NRF. The specific URI is not explicitly stated in the CVE, but it is associated with the discover_smf function. A typical SBI path for SMF discovery might be /smf-discovery or triggered via an NRF query for smf service.
  • 2. Exploitation

    The attacker sends a series of requests to the vulnerable endpoint to trigger the resource leak. Since the exact payload is not public in the CVE description, the following is an illustrative example of how such a DoS might be triggered:
  • Hypothesis: The discover_smf function allocates a buffer or opens a socket to query the NRF or local SMF list. If the response is malformed, or if the request is repeated rapidly without proper cleanup, resources are not released.
  • PoC Concept (Illustrative):
  • # Illustrative PoC: Rapidly send requests to the SMF discovery endpoint
        # Note: The exact URI and payload are not specified in the CVE.
        # This assumes the endpoint is exposed on port 8080 and requires no auth.
        
        for i in {1..10000}; do
          curl -s -X POST "http://<target_amf_ip>:8080/smf-discovery" \
               -H "Content-Type: application/json" \
               -d '{"requestId": "test-'"$i"'", "plmnId": "00101", "snssai": {"sst": 1}}' \
               --max-time 1 &
        done
        wait

    * Mechanism: Each request triggers amf_sbi::discover_smf. If the function fails to free the allocated memory or close the socket after processing (or on error), the AMF's resource pool depletes.
    * Alternative Trigger: If the vulnerability is related to a specific malformed JSON field that causes an exception before the cleanup code runs, the attacker would send a malformed JSON payload (e.g., missing required fields or invalid types) to force an error path that skips resource release.

    3. Post-exploitation

  • Impact: The AMF process crashes or becomes unresponsive due to resource exhaustion (OOM or file descriptor limit).
  • Consequence:
  • * Service Disruption: The AMF is responsible for handling UE (User Equipment) registration, authentication, and mobility management. Its failure leads to: * Inability for new UEs to register on the network. * Loss of connectivity for existing UEs during handovers or session updates. * Potential cascading failure if other core network functions depend on the AMF's status. * No Data Breach: As per CVSS (C:N/I:N), there is no confidentiality or integrity impact. The attacker does not gain access to data or modify system state.

    🌍 Real World Impact

  • Confidentiality (None): No data is leaked.
  • Integrity (None): No data is modified or corrupted.
  • Availability (Low): The AMF service becomes unavailable. In a 5G core, this is a critical component. A DoS on the AMF can lead to:
  • * Network Outage: Users in the affected area may lose 5G connectivity. * Fallback to 4G: If the network is designed to fall back to LTE, users may experience degraded service. * Operational Disruption: Emergency services or critical IoT applications relying on 5G may be affected.
  • Practical Consequences:
  • * Telecom Operators: Risk of service level agreement (SLA) violations and customer complaints. * Critical Infrastructure: If 5G is used for critical infrastructure (e.g., smart grids, autonomous vehicles), a DoS could have safety implications. * Reputation Damage: Publicized DoS attacks on 5G networks can erode trust in 5G technology.

    🛡️ Remediation & Mitigation

    1. Patching

  • Affected Versions: OpenAirInterface oai-cn5g-amf up to and including 2.2.2.
  • Fix: Apply the patch identified as commit 1eabe18bf0cb5a248e0429f4daac91dee51c8a43. This commit likely adds proper resource cleanup (e.g., delete, close(), or free()) in the amf_sbi::discover_smf function, particularly on error paths.
  • Recommendation: Upgrade to a version of OpenAirInterface that includes this commit. Check the OAI release notes for the specific version that incorporates this fix (likely 2.2.3 or later, but verify with the vendor).
  • 2. Workarounds

  • Network Segmentation: Restrict access to the AMF's SBI interface. Ensure that only authorized core network functions (e.g., NRF, SMF) can communicate with the AMF. Use firewalls to block external access to the AMF's HTTP/2 ports.
  • Rate Limiting: Implement rate limiting on the SBI endpoints to prevent rapid-fire requests that could trigger resource exhaustion.
  • Disable Unnecessary Services: If the SMF discovery feature is not required for the specific deployment, consider disabling it or hardcoding the SMF address to avoid dynamic discovery.
  • 3. Detection

  • Log Monitoring: Monitor AMF logs for repeated calls to discover_smf or errors related to resource allocation.
  • * Example Log Pattern:
    [AMF] ERROR: Failed to allocate memory for SMF discovery
            [AMF] WARN: High number of concurrent SMF discovery requests
  • System Metrics: Monitor the AMF process for:
  • * Increasing memory usage over time. * High number of open file descriptors. * CPU spikes associated with the discovery thread.
  • Network Traffic Analysis: Look for a high volume of HTTP/2 requests to the AMF's SBI endpoint, especially from unauthorized IPs.
  • ⚠️ Urgency

  • CVSS Score: 5.3 (Medium)
  • CISA KEV: No
  • Exploit Availability: Public exploit is mentioned in the CVE description ("The exploit is now public and may be used").
  • Priority: High for 5G core network operators.
* Although the CVSS score is medium, the impact on a critical network component (AMF) is significant. A DoS on the AMF can lead to widespread service disruption. * The fact that the exploit is public increases the risk of opportunistic attacks. * Recommendation: Patch immediately. If patching is not possible, implement strict network segmentation and rate limiting to mitigate the risk.

[🤖 CVE Professor AI Security Engine]

Target Reconnaissance Queries (FOFA & Shodan)

FOFA Query

app="openairinterface oai-cn5g-amf"
PoC & Exploit Intelligence (GitHub)
Technical reference / advisory repository for CVE-2026-138052
Technical reference / advisory repository for CVE-2026-138052
Technical reference / advisory repository for CVE-2026-138052
Technical reference / advisory repository for CVE-2026-138052
CVSS Score
5.3 / 10 · CVSS MEDIUM
Weakness Types (CWE)
CWE-404
Affected Products (1)
openairinterface:oai-cn5g-amf
Related CVEs
5.3
CVE-2026-144774
A vulnerability was determined in OpenAirInterface oai-cn5g-amf 2.2.2. This impacts the function Nssai::Decode
8.7
CVE-2026-144743
A vulnerability has been found in D-Link DIR-878 1.20B05. This impacts the function GetCAPTCHAsetting of the f
8.7
CVE-2026-144815
A flaw has been found in EZVIZ CS-C2C and CS-C6c 5.3. This impacts an unknown function of the component RTSP S
7.5
CVE-2026-144813
A flaw has been found in Shenzhen Xiaopai Technology LC2310-CSD53 1.00.18. This affects an unknown part of the
7.5
CVE-2026-144817
A vulnerability was found in EZVIZ CS-C2C and CS-C6c 5.3. Affected by this vulnerability is an unknown functio
5.3
CVE-2026-144744
A vulnerability was found in OpenBMB Internet of Agents up to 9d78e88e47160eb42ee1ee8538c05e1c2c47877a. Affect
4.9
CVE-2026-144814
A vulnerability has been found in Shenzhen Xiaopai Technology LC2310-CSD53 1.00.18. This vulnerability affects