CVE-2026-41136: free5GC AMF missing default case in Content-Type switch in HTTPUEContextTransfer

Published Apr 21, 2026
·
Updated

Summary

The HTTPUEContextTransfer handler in internal/sbi/apicommunication.go does not include a default case in the Content-Type switch statement. When a request arrives with an unsupported Content-Type, the deserialization step is silently skipped, err remains nil, and the processor is invoked with a completely uninitialized UeContextTransferRequest object.

Details

In internal/sbi/apicommunication.go, the HTTPUEContextTransfer function handles the Content-Type header with a switch statement that only covers application/json and multipart/related:

go switch str[0] { case applicationjson: err = openapi.Deserialize(ueContextTransferRequest.JsonData, requestBody, contentType) case multipartrelate: err = openapi.Deserialize(&ueContextTransferRequest, requestBody, contentType) // no default case }

if err != nil { // skipped entirely when Content-Type is unsupported c.JSON(http.StatusBadRequest, rsp) return }

s.Processor().HandleUEContextTransferRequest(c, ueContextTransferRequest)

This is inconsistent with the two analogous handlers in the same file, HTTPCreateUEContext and HTTPN1N2MessageTransfer, which both correctly include a default branch:

go default: err = fmt.Errorf("wrong content type")

The fix is simply to add the same default case to HTTPUEContextTransfer.

PoC

With a free5GC deployment running, send a POST request to the UE context transfer endpoint using any unsupported Content-Type (e.g. text/plain):

bash curl -s -X POST "http://<AMFIP>/namf-comm/v1/ue-contexts/<ueContextId>/transfer" \\ -H "Content-Type: text/plain" \\ -d '{"test":"data"}' \\ -i

Expected (correct) behavior: 400 Bad Request from the SBI layer, rejecting the request due to unsupported Content-Type — consistent with HTTPCreateUEContext.

Actual (observed) behavior: The SBI-layer error check is bypassed and the processor is reached with an empty request object, returning:

HTTP/1.1 400 Bad Request {"status": 400, "cause": "MANDATORYIEMISSING"}

The MANDATORYIEMISSING cause originates from the processor's internal validation, not from the SBI handler — confirming the processor was called with an uninitialized struct.

Impact

The endpoint is an inter-NF SBI API used during AMF-to-AMF UE context handover. It is not directly reachable from external UEs and requires access to the internal 5GC SBI network. The processor's secondary mandatory field validation prevents any unintended state modification, so there is no direct exploitability. However, the SBI handler layer is the intended first line of defense — relying on the processor to compensate for a missing input check increases fragility and violates defense in depth. Any future change to the processor's validation logic could inadvertently expose the system to processing completely empty request objects.

Other sources

free5GC AMF provides Access & Mobility Management Function (AMF) for free5GC, an an open-source project for 5th generation (5G) mobile core networks. Prior to version 1.4.3, the HTTPUEContextTransfer handler in internal/sbi/apicommunication.go does not include a default case in the Content-Type switch statement. When a request arrives with an unsupported Content-Type, the deserialization step is silently skipped, err remains nil, and the processor is invoked with a completely uninitialized UeContextTransferRequest object. Version 1.4.3 contains a fix.

MITRE

Affected Software

4 affected components
free5gc AMF<1.4.3
go/github.com/free5gc/amf<=1.4.3
free5gc Amf Go<1.4.3
free5gc Free5gc<=4.2.1

Event History

Apr 21, 2026
CVE Published
via MITRE·11:54 PM
Data Sourced
via MITRE·11:54 PM
DescriptionWeakness
Apr 22, 2026
Data Sourced
via NVD·12:16 AM
DescriptionSeverityWeaknessAffected Software
Advisory Published
via GitHub·07:54 PM
Data Sourced
via GitHub·07:54 PM
DescriptionWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2026-41136?

CVE-2026-41136 has been categorized as a medium severity vulnerability due to its potential impact on the content type handling in HTTPUEContextTransfer.

2

How do I fix CVE-2026-41136?

To resolve CVE-2026-41136, users should upgrade free5GC AMF to version 1.4.3 or later.

3

What software is affected by CVE-2026-41136?

CVE-2026-41136 affects the free5GC AMF software versions prior to 1.4.3.

4

What impact does CVE-2026-41136 have on free5GC AMF users?

CVE-2026-41136 may lead to improper handling of Content-Type in HTTP requests, potentially affecting communications.

5

When was CVE-2026-41136 disclosed?

CVE-2026-41136 was disclosed prior to the release of version 1.4.3 of free5GC AMF.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203