CVE-2026-138051 in oai-cn5g-upf
Summary
by MITRE • 11/28/2026
A security vulnerability has been detected in OpenAirInterface oai-cn5g-upf up to 2.2.2. This issue affects the function pfcp_user_id_ie::load_from of the file pfcp/3gpp_29.244.hpp of the component PFCP N4 User ID IE Type 141 Parser. The manipulation leads to heap-based buffer overflow. Remote exploitation of the attack is possible. The exploit has been disclosed publicly and may be used. The vendor was contacted early about this disclosure.
If you want to get the best quality for vulnerability data then you always have to consider VulDB.
Analysis
by VulDB Data Team • 11/29/2026
The OpenAirInterface project, a prominent open-source implementation of 5G Next Generation Core networks, contains a critical security flaw within its PFCP N4 User ID Information Element parser. Specifically, the vulnerability resides in the pfcp_user_id_ie::load_from function located in the file pfcp/3gpp_29.244.hpp. This component is responsible for parsing Protocol Data Unit Forwarding Control (PFCP) messages exchanged between the Session Management Function and the User Plane Function over the N4 interface. The flaw manifests as a heap-based buffer overflow, which occurs when the parser processes malformed or maliciously crafted input data that exceeds the allocated memory bounds. This type of vulnerability is particularly dangerous because it allows an attacker to write data beyond the intended boundaries of a dynamically allocated buffer on the heap, potentially overwriting adjacent memory structures such as metadata used by the memory allocator or other critical application variables.
From a technical perspective, this issue aligns with CWE-122, which classifies heap-based buffer overflow vulnerabilities where insufficient bounds checking is performed before copying data into a fixed-size buffer. The root cause typically involves failing to validate the length field of an incoming PFCP Information Element against the size of the destination buffer prior to execution. In the context of 5G core networks, the N4 interface handles session management and control signaling that dictates how user traffic is forwarded. A successful exploitation of this vulnerability could allow a remote attacker to execute arbitrary code with the privileges of the affected process, typically running as root or within a containerized environment with elevated permissions. This represents a severe compromise of confidentiality, integrity, and availability for the 5G core infrastructure.
The operational impact of this vulnerability is significant given its potential for remote exploitation. Since PFCP traffic often traverses network boundaries between different administrative domains in mobile networks, an attacker positioned on the N4 interface could craft specific PFCP messages to trigger the overflow. Successful exploitation may lead to complete system compromise, enabling the attacker to intercept user data, modify routing rules, or disrupt service availability by crashing the User Plane Function process. This aligns with MITRE ATT&CK technique T1203, which covers Exploitation for Client Execution, and potentially T1498, Network Denial of Service, depending on how the overflow is leveraged to destabilize the system memory state. The fact that a public exploit has been disclosed increases the risk landscape considerably, as automated scanning tools and malicious actors can now readily target vulnerable instances without requiring custom development efforts.
Mitigation strategies must address both immediate remediation and long-term architectural resilience. The primary solution is to apply the vendor-provided patch or upgrade OpenAirInterface to version 2.2.3 or later where this parsing logic has been corrected with proper bounds checking. In environments where immediate upgrading is not feasible, network segmentation should be enforced to restrict access to the N4 interface exclusively to trusted Session Management Function nodes using strict firewall rules and mutual TLS authentication if supported by the deployment configuration. Additionally, deploying intrusion detection systems capable of inspecting PFCP payloads for anomalous length fields or malformed structures can provide an additional layer of defense. Developers must also adopt secure coding practices that emphasize input validation and memory safety checks in all network-facing parsers to prevent similar heap-based vulnerabilities from being introduced in future releases.