Executive brief
free5gc is an open-source 5G mobile network core implementation. The AMF (Access and Mobility Management Function) handles subscription management for event notifications. A vulnerability in the subscription modification handler allows an attacker to crash the AMF service by submitting a PATCH request with a negative array index, causing a runtime panic and service unavailability.
Technical details
The ModifyAMFEventSubscriptionProcedure function in processor/event_exposure.go parses an array index from a JSON Patch request path field using strconv.Atoi() without validating that the parsed integer is non-negative. When a negative index is supplied (e.g., "/eventList/-1"), Go's runtime panics with a "slice bounds out of range" error during slice indexing. The vulnerability is triggered by an unauthenticated PATCH request to the /namf-evts/v1/subscriptions/{id} endpoint. An attacker can cause a denial of service by repeatedly sending crafted requests with negative indices, crashing the AMF process. The fix requires validation of the parsed index before use as a slice accessor.
Affected products
- free5gc free5gc v4.0.1, v4.1.0
Timeline
- 2026-01-06: disclosed: Issue reported on GitHub
- 2026-08-27: advisory: CVE-2026-30050 published