Summary
free5GC's Session Management Function (SMF) exposes UPI management endpoints without enforcing OAuth2 or bearer‑token authorization, allowing unauthenticated access over the SBI.
An attacker who can reach the SMF's SBI interface can perform read, create, and delete operations on UP node/link configuration, potentially gaining full control over user‑plane routing behavior.
Affected context
This vulnerability appears in free5GC deployments where:
- The SMF component exposes its Service-Based Interface (SBI) over an IP network
- The UPI management route group is mounted without OAuth2/bearer-token middleware
- Network controls allow untrusted or semi-trusted parties to reach SMF SBI endpoints
In such environments, the /upi/v1/upNodesLinks API is reachable without any Authorization header, and requests are processed by SMF business logic as if they were legitimate management operations.
Exploit preconditions
- Attack surface: SMF SBI HTTP/REST endpoints, specifically the UPI management routes under
/upi/v1/upNodesLinks. - Required access: Network-level ability to send HTTP requests to the SMF's SBI interface (no credentials or tokens required).
- Trigger point: Direct invocation of UPI management endpoints (e.g., GET/POST/DELETE on
/upi/v1/upNodesLinksand related paths) without an Authorization header. - Why exploitation is possible: The UPI route group is mounted without any authorization middleware, so the SMF does not validate the caller's identity or privileges before executing configuration-changing business logic.
Why this happens
The core issue is missing authorization enforcement on a sensitive management API, aligning with CWE-306: Missing Authentication for Critical Function and CWE-862: Missing Authorization.
The UPI management route group is registered in the SMF's HTTP router without attaching the OAuth2/bearer-token middleware that other SBI routes use. As a result, the API implicitly treats all incoming requests as authorized and forwards them directly to the business handlers. This design breaks the assumption that SBI management operations are always gated by strong authentication and fine-grained access control, and creates an unauthenticated control plane for user-plane configuration.
Potential impact
- Remote modification of UP node and link configuration without any authentication.
- Injection of attacker-controlled UP nodes or links, enabling traffic redirection or interception.
- Deletion of existing UP node/link mappings, causing service disruption or denial of service to subscribers.
- Manipulation of user-plane routing that may facilitate data exfiltration, traffic blackholing, or lawful-intercept bypass.
- Potential pivot into broader 5G core components through crafted routing or misdirected traffic flows.
General mitigation guidance
Effective mitigation focuses on enforcing strong, centralized authorization for all management and control-plane APIs and reducing exposure of SBI interfaces:
- Ensure that every SBI route group, especially configuration and management APIs, is consistently wrapped with authentication and authorization middleware (e.g., OAuth2 introspection or token validation).
- Adopt a default-deny routing pattern where new endpoints must explicitly opt into required security middleware before they can be exposed.
- Apply role-based access control (RBAC) to management endpoints so that only appropriately scoped identities can read, create, or delete UPI resources.
- Isolate SMF SBI interfaces on protected network segments, limiting which systems can initiate SBI calls.
- Use least-privilege service identities for all components interacting with SMF, and avoid sharing tokens or credentials across unrelated services.
- Regularly audit routing and middleware registration code to confirm that new route groups cannot bypass security checks.
How teams detect issues like this
Organizations can detect and monitor this class of issue using a combination of code-centric and operational techniques:
- Static analysis and linting: Define rules that flag route registrations that lack required authentication/authorization middleware, especially under management or
/upi/paths. - Code review checklists: Incorporate explicit review steps to verify that every new SBI endpoint is bound to the standard security middleware stack and respects RBAC policies.
- Configuration and policy enforcement: Use gateway or service-mesh policies (e.g., API gateways, sidecars) that require valid tokens on SBI routes and reject unauthenticated requests by default.
- Runtime monitoring: Enable API access logs and alerts for anonymous or token-less access to sensitive endpoints, watching for unusual patterns of UPI configuration changes.
- Security testing: Include negative tests in CI/CD that attempt to call management APIs without credentials and fail the pipeline if such calls succeed.

