/

CVE-2026-42083

Severity:

HIGH RISK

(8.2)

Missing Authorization in free5GC PCF Npcf_SMPolicyControl

CVE-2026-42083

Analyzed

Vulnerability type

Category:

Missing Authorization

CWE:

CWE-862

Impact:

Unauthorized Access to Subscriber SM Policies and SUPI Disclosure

Severity:

HIGH RISK

(8.2)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

free5GC's PCF Npcf_SMPolicyControl service exposes SM policy management endpoints without enforcing authorization middleware, allowing unauthenticated requests to reach core business logic.

An attacker who can reach these endpoints over the network may access or manipulate SM policy resources and disclose sensitive subscriber identifiers (SUPI) without presenting a valid OAuth token.

Affected context

The vulnerability occurs in free5GC deployments running affected versions of the PCF component, specifically in the Npcf_SMPolicyControl service.

In NewServer(), the smPolicyGroup route group is created without attaching the router authorization middleware, unlike other PCF service groups.

As a result, the following endpoints are exposed without proper authorization checks:

  • /npcf-smpolicycontrol/v1/sm-policies
  • /npcf-smpolicycontrol/v1/sm-policies/{smPolicyId}
  • /npcf-smpolicycontrol/v1/sm-policies/{smPolicyId}/update
  • /npcf-smpolicycontrol/v1/sm-policies/{smPolicyId}/delete

Any environment where these endpoints are reachable from untrusted networks or shared control planes is at increased risk.

Exploit preconditions

  • Attack surface: Network-accessible PCF Npcf_SMPolicyControl HTTP API.
  • Required access: Ability to send HTTP requests to the exposed SM policy endpoints; no valid OAuth token is required due to missing middleware.
  • Trigger point: Direct invocation of the SM policy handlers via the listed REST routes.
  • Why exploitation is possible: The smPolicyGroup routes are registered without the RouterAuthorizationCheck middleware, so the framework never enforces token validation or authorization before executing business logic.

Why this happens

This issue stems from inconsistent application of authorization middleware in the PCF routing setup.

When the server is initialized, the smPolicyGroup route group for Npcf_SMPolicyControl is created and receives its handlers without attaching the same authorization middleware used by other PCF service groups (such as Npcf_PolicyAuthorization).

This maps to CWE-862: Missing Authorization, where access control is expected but not actually enforced on a resource.

Conceptually, the bug reflects a broken security boundary at the routing layer: security checks are implemented, but not uniformly applied to all relevant routes, leaving a subset of endpoints unprotected.

Potential impact

  • Unauthenticated retrieval of subscriber SM policy data.
  • Disclosure of sensitive subscriber identifiers (SUPI) and related metadata.
  • Unauthorized creation, modification, or deletion of SM policies.
  • Potential disruption of subscriber service behavior through policy tampering.
  • Increased risk of lateral movement or data correlation when combined with other weaknesses in the 5G core environment.

General mitigation guidance

Effective mitigation focuses on enforcing consistent, centralized authorization for all PCF HTTP routes, particularly those handling subscriber or policy data.

Useful defensive patterns include:

  • Ensuring every API route group in the PCF server attaches a common authorization middleware that validates OAuth tokens and enforces policy decisions before business logic runs.
  • Adopting a "secure-by-default" routing pattern where new routes inherit mandatory security middleware instead of requiring opt-in configuration.
  • Implementing explicit access control checks within SM policy handlers as a defense in depth measure, even when middleware is expected to run.
  • Restricting network exposure of PCF interfaces so that only trusted control-plane components can reach Npcf_SMPolicyControl endpoints.
  • Applying principle of least privilege for tokens and service accounts that interact with SM policy APIs.

How teams detect issues like this

Detection typically involves a mix of code-level inspection and runtime monitoring:

  • Static analysis or linting rules that flag route registrations missing required authorization middleware or annotations.
  • Code review checklists that explicitly require verification of authentication and authorization for all new API route groups, especially in control-plane services.
  • Automated tests or integration tests that exercise protected endpoints both with and without valid OAuth tokens, asserting that unauthorized requests are rejected.
  • API gateway or service mesh policies that log and alert on successful responses to protected paths when no authentication credentials are present.
  • Periodic configuration and architecture reviews to ensure consistency between documented security controls and actual implementation in routing code.

Sources

SourceLink
github.comgithub.com/free5gc/free5gc/issues/844
github.comgithub.com/free5gc/free5gc/security/advisories/GHSA-6rgm-gr97-x3j5
github.comgithub.com/free5gc/pcf/commit/8c4d457cdf58bb239ee30e88c56b370b22073964
github.comgithub.com/free5gc/pcf/pull/63

Frequently asked

questions

Exploitability depends on network exposure: if the PCF Npcf_SMPolicyControl endpoints are reachable from untrusted or semi-trusted networks, an attacker can access them without valid OAuth credentials.

No. Because the authorization middleware is not attached to the affected routes, requests without any valid OAuth token can still reach and invoke SM policy handlers.

The broad fix pattern is to centralize and enforce authorization middleware on all PCF route groups, ensuring that SM policy endpoints cannot be registered without passing through a common authentication and authorization layer, and to supplement this with in-handler access checks for critical operations.

Prevention involves adopting secure-by-default routing frameworks, adding automated checks to ensure every new route includes required security middleware, integrating access control reviews into code review processes, and building tests that verify protected endpoints consistently reject unauthorized requests.

Find out what's already
exploitable in your codebase.