Summary
OpenAirInterface CN5G AMF versions up to and including v2.0.1 contain an improper input validation flaw when processing JSON-formatted requests on the SBI interface.
A remote, unauthorized attacker can send specially crafted JSON data that triggers a logical error in the AMF, potentially resulting in a denial-of-service condition for 5G core signaling.
Affected context
This vulnerability affects deployments of the OpenAirInterface CN5G Access and Mobility Management Function (AMF) that:
- Expose the AMF's SBI (Service-Based Interface) endpoint to other network functions or potentially untrusted peers
- Accept and parse JSON-formatted SBI requests
- Do not enforce strict validation or schema checking on incoming JSON payloads before processing logic is applied
The issue is triggered at runtime during normal request handling, when malformed or malicious JSON data reaches the AMF's request-processing logic.
Exploit preconditions
- Attack surface: Network-accessible AMF SBI interface (HTTP/JSON over the service-based architecture)
- Required access: Ability to reach the AMF SBI endpoint over the control-plane network; no valid credentials are required according to the description
- Trigger point: Submission of crafted JSON requests that exercise the logical error during parsing or business logic processing
- Why exploitation is possible: The AMF trusts structural and semantic correctness of incoming JSON without robust validation, allowing malformed or adversarial data to reach code paths that cannot safely handle it, ultimately causing a denial-of-service condition
Why this happens
The underlying bug falls under CWE-20: Improper Input Validation. The AMF's SBI handler assumes that inbound JSON messages conform to expected shapes, types, and value ranges.
Instead of rigorously validating JSON against a schema or defensive parsing rules, the implementation appears to apply business logic directly to the parsed data. This creates a logical error path where unexpected or malformed JSON states are not gracefully handled, leading to resource exhaustion, crashes, or unstable AMF behavior when adversarial inputs are processed.
Potential impact
- Disruption of AMF service availability due to process crashes or hangs
- Temporary loss of mobility management and registration services in affected 5G core deployments
- Interruption or degradation of user equipment (UE) attach, registration, and handover procedures
- Potential cascading effects on other core network functions that rely on AMF responsiveness
General mitigation guidance
Effective mitigation focuses on tightening input validation and isolating the AMF from untrusted or malformed traffic:
- Introduce strict JSON schema validation for all SBI endpoints, rejecting any request that does not conform before business logic is executed
- Apply robust type checking, bounds checking, and presence checks for all critical fields parsed from JSON inputs
- Implement defensive programming patterns in the request-processing path, ensuring that unexpected states are handled gracefully and cannot crash or stall the service
- Use network segmentation and access control to ensure only trusted network functions can reach the AMF SBI interface
- Employ rate-limiting and request-size limits at gateways or reverse proxies fronting the AMF to reduce the impact of abusive traffic patterns
- Run the AMF with appropriate resource limits and supervision (e.g., process watchdogs) to support rapid recovery from failures without manual intervention
How teams detect issues like this
Detection typically combines traffic monitoring with code-level analysis:
- Use static analysis or manual code review to identify request-handling paths that lack JSON schema validation, type checks, or error handling around parsing logic
- Define secure coding guidelines for SBI handlers that mandate input validation layers separate from business logic, and review code for adherence
- Monitor AMF logs for recurring parsing errors, malformed request traces, or abrupt termination messages associated with specific JSON patterns
- Deploy network monitoring or WAF-like controls at the SBI boundary to flag or block anomalous JSON payloads, such as unexpected structures, extreme nesting, or oversized fields
- Integrate automated security testing (e.g., fuzzing of JSON SBI endpoints) into CI/CD pipelines to surface crashes or hangs driven by malformed input

