Skip to main content

Boteraser | Website and Server Security Solutions

🛡️ CVE-2026-41136 — amf

🟡 CVSS 5.3 — Medium ⚠️ Exploit Public CWE-440 NVD
5.3
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

free5GC AMF: Missing default case in Content-Type switch in HTTPUEContextTransfer

Summary

The HTTPUEContextTransfer handler in internal/sbi/api_communication.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/api_communication.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://<AMF_IP>/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": "MANDATORY_IE_MISSING"}

```

The MANDATORY_IE_MISSING 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.

How this vulnerability can be exploited

This issue can be reached over the network, attack complexity is low, an attacker needs no privileges on the target. No user interaction is required. The scope is unchanged, so the impact stays within the vulnerable component. Rated impact: confidentiality none, integrity low, availability none.

CVSS metrics in full

The score comes from this vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N

  • Attack vector: Network — reachable from anywhere that can route to the service.
  • Attack complexity: Low — the attack works reliably, with no preparation.
  • Privileges required: None — an unauthenticated stranger can try it.
  • User interaction: None — nobody has to be tricked into anything.
  • Scope: Unchanged — the damage stays inside the vulnerable component.
  • Confidentiality impact: None.
  • Integrity impact: Low — limited, and the attacker does not choose what is affected.
  • Availability impact: None.

Weakness class

CVE-2026-41136 is classified as CWE-440: Expected Behavior Violation. A feature, API, or function does not perform according to its specification.

Affected software

CVE-2026-41136 is recorded against 3 packages.

  • amf (fixed in 1.4.3)
  • free5gc (fixed in 4.2.1)
  • github.com/free5gc/amf

Timeline and source

Published on 22 April 2026 and last revised on 17 June 2026. A public exploit is known to exist, which raises the urgency of patching considerably. Record sourced from NVD.

References

github.com
github.com
github.com

Other advisories for this package

amf has other advisories on record. If you are patching this one, these are worth checking on the same host:

Same weakness in other software

These advisories are the same class of weakness (CWE-440: Expected Behavior Violation) in other software:

Details

Severity MEDIUM
CVSS Score 5.3
CVSS Vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
CWE CWE-440
Public Exploit ⚠️ Yes
Source NVD
Published 2026-04-22
Updated 2026-08-20
Modified 2026-06-17
Fix URL N/A

Affected Packages

Software From version Fixed in
amf 1.4.3
free5gc 4.2.1
github.com/free5gc/amf

Similar Threats

Exploit Protection

Are you running amf?

CVE-2026-41136 carries CVSS 5.3 Medium rating and a public exploit already exists. BotEraser checks your installation against this and other known CVE records, and blocks IPs associated with exploit activity.

Check My Site For CVE-2026-41136 →

No credit card required  ·  Results in minutes

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.

Browse related advisories

All advisoriesCVECVE 2026