Vulnerabilities in pkg:golang/github.com/free5gc/amf

PACKAGE
Advisory Identifier: GHSA-vrrx-58h3-prmh
Advisory Summary

CVE-2026-42082 is a LOW (CVSS 3.7) free5gc amf has missing concurrent vulnerability (CWE-358: Improperly Implemented Security Check for Standard) affecting Github.com/free5gc/amf libraries in the Go ecosystem. The issue involves free5gc amf has missing concurrent nas smc validation during ngap handover. Remediation is available in the latest vendor maintenance releases.

5 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:golang/github.com/free5gc/amf

5 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:golang/github.com/free5gc/amf. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-vrrx-58h3-prmh CVE-2026-42082 LOW Free5GC AMF has Missing Concurrent NAS SMC Validation During NGAP Handover
GHSA-77x9-rf64-92gv CVE-2026-42081 MODERATE Free5GC AMF Bypasses UE Security Capabilities on NGAP PathSwitchRequest
GHSA-r99v-75p9-xqm5 CVE-2026-41136 MODERATE free5GC AMF: Missing default case in Content-Type switch in HTTPUEContextTransfer
GHSA-xq44-64rg-8g3h CVE-2026-4531 MODERATE Free5GC AMF is vulnerable to DoS through its HandleRegistrationComplete function
GHSA-jcrr-rr6w-8c83 CVE-2023-49391 HIGH free5GC AMF denial of service vulnerability

CVE-2026-42082 at a Glance

CVE Identifier CVE-2026-42082
GHSA Identifier GHSA-vrrx-58h3-prmh
Severity LOW
CVSS v3.1 Base Score 3.7
CWE Classification CWE-358: Improperly Implemented Security Check for Standard
Affected Product Github.com/free5gc/amf
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 3.7

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:A/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:L).

Attack Vector Adjacent (AV:A)
Attack Complexity High (AC:H)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity Low (I:L)
Availability Low (A:L)

How to Fix CVE-2026-42082

To remediate this vulnerability, upgrade all affected Github.com/free5gc/amf dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/free5gc/amf fixed: Latest secure release
Upgrade github.com/free5gc/amf to Latest secure release
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/free5gc/amf

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-42082, inspect your project dependencies for Github.com/free5gc/amf:

inspect dependencies for github.com/free5gc/amf

Analyze the terminal output to locate any version of Github.com/free5gc/amf in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-358: Improperly Implemented Security Check for Standard, where the product does not implement or incorrectly implements one or more security-relevant checks as specified by the design of a standardized algorithm, protocol, or technique. In Github.com/free5gc/amf, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary The AMF in Free5GC v4.2.1 does not enforce the concurrent security procedure rules defined in 3GPP TS 33.501 §6.9.5.1. The AMF does not check for ongoing N2 handover procedures before initiating a NAS Security Mode Command, and vice versa. This can lead to mismatches between NAS and AS security contexts in the network and the UE. ### Details **Vulnerability Type:** CWE-358 (Improperly Implemented Security Check for Standard) **Affected File:** `internal/ngap/handler.go` — `handleHandoverRequiredMain()` and `internal/gmm/sm.go` — `SecurityMode()` **Root Cause:** 3GPP TS 33.501 §6.9.5.1 states: > "Concurrent runs of security procedures may, in certain situations, lead to mismatches between security contexts in the network and the UE. In order to avoid such mismatches, the following rules shall be adhered to: > 1. AMF shall not initiate any of the N2 procedures including a new key towards a UE if a NAS Security Mode Command procedure is ongoing with the UE. > 2. The AMF shall not initiate a NAS Security Mode Command towards a UE if one of the N2 procedures including a new key is ongoing with the UE." Free5GC AMF uses an `OnGoing` state tracking mechanism (`SetOnGoing()`, `GetOnGoing()`) with `OnGoingProcedureN2Handover` type. However, the cross-procedure checks required by §6.9.5.1 are not implemented: **Rule 2 violation:** `SecurityMode()` in `internal/gmm/sm.go` sends SMC on `EntryEvent` without checking if N2 handover is ongoing. **Rule 1 violation:** `handleHandoverRequiredMain()` in `internal/ngap/handler.go` calls `SetOnGoing(OnGoingProcedureN2Handover)` without checking if SMC is ongoing. **Why NH/NCC and SMC are related:** SMC activates a new KAMF, which changes the basis for NH key derivation. The N2 HandoverRequest includes NH/NCC derived from the old KAMF. If both procedures run concurrently, the target gNB and UE derive different KgNB keys, breaking AS security. ### PoC **Source code evidence:** Free5GC AMF `internal/gmm/sm.go` — `SecurityMode()`: ```go func SecurityMode(state *fsm.State, event fsm.EventType, args fsm.ArgsType) { switch event { case fsm.EntryEvent: // No check for OnGoing N2 procedure // Directly proceeds to SMC ``` Free5GC AMF `internal/ngap/handler.go` — `handleHandoverRequiredMain()`: ```go amfUe.SetOnGoing(sourceUe.Ran.AnType, &context.OnGoing{ Procedure: context.OnGoingProcedureN2Handover, }) // No check for ongoing SMC before setting N2 ``` **Packet Evidence (pcap available):** | Packet | Time | Message | Description | |--------|------|---------|-------------| | #1 | 0.000s | HandoverRequired | gNB_A requests handover | | #18 | 0.002s | **HandoverRequest** | **N2 started (NH/NCC included)** | | | | *(no response from gNB_B)* | **N2 ongoing** | | #28 | 2.062s | Registration request | UE re-registers (same SUPI) | | #63 | 2.069s | Authentication request | | | #64 | 2.070s | Authentication response | | | #71 | 2.072s | **Security mode command** | **SMC during N2 ongoing = Rule 2 violation** | [NGAPHandover-N2-SMC-Concurrent.zip](https://github.com/user-attachments/files/26735421/NGAPHandover-N2-SMC-Concurrent.zip) ### Impact **Integrity (MEDIUM):** Concurrent NAS and AS security procedures can cause security context mismatches between UE, AMF, and gNB. The SMC activates a new KAMF while the N2 HandoverRequest carries NH/NCC derived from the old KAMF, resulting in KgNB derivation mismatch. **Availability (LOW):** Security context mismatch may cause handover failure or security verification failures.

CVE-2026-42082 Affected Github.com/free5gc/amf Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
github.com/free5gc/amf
Go
≤ 1.4.3

References

Frequently Asked Questions

What is CVE-2026-42082?
CVE-2026-42082 is a security vulnerability in Github.com/free5gc/amf involving Free5GC AMF has Missing Concurrent NAS SMC Validation During NGAP Handover under CWE-358: Improperly Implemented Security Check for Standard.
Which Github.com/free5gc/amf versions are affected?
Affected versions include releases prior to current release patches across affected packages: github.com/free5gc/amf.
What version fixes CVE-2026-42082?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/free5gc/amf affected?
Yes, github.com/free5gc/amf is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2026-42082?
CVE-2026-42082 has a CVSS v3.1 base score of 3.7 (LOW) with vector string CVSS:3.1/AV:A/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:L.
What CWE is associated with CVE-2026-42082?
CVE-2026-42082 is classified under CWE-358: Improperly Implemented Security Check for Standard (The product does not implement or incorrectly implements one or more security-relevant checks as specified by the design of a standardized algorithm, protocol, or technique.).
How can I check Go dependencies for CVE-2026-42082?
Run the dependency tree command: 'inspect dependencies for github.com/free5gc/amf'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-vrrx-58h3-prmh",
  "modified" : "2026-06-08T23:46:41Z",
  "published" : "2026-05-07T01:56:13Z",
  "aliases" : [ "CVE-2026-42082" ],
  "summary" : "Free5GC AMF has Missing Concurrent NAS SMC Validation During NGAP Handover ",
  "details" : "### Summary\n\nThe AMF in Free5GC v4.2.1 does not enforce the concurrent security procedure rules defined in 3GPP TS 33.501 §6.9.5.1. The AMF does not check for ongoing N2 handover procedures before initiating a NAS Security Mode Command, and vice versa. This can lead to mismatches between NAS and AS security contexts in the network and the UE.\n\n### Details\n\n**Vulnerability Type:** CWE-358 (Improperly Implemented Security Check for Standard)\n\n**Affected File:** `internal/ngap/handler.go` — `handleHandoverRequiredMain()` and `internal/gmm/sm.go` — `SecurityMode()`\n\n**Root Cause:**\n\n3GPP TS 33.501 §6.9.5.1 states:\n\n> \"Concurrent runs of security procedures may, in certain situations, lead to mismatches between security contexts in the network and the UE. In order to avoid such mismatches, the following rules shall be adhered to:\n> 1. AMF shall not initiate any of the N2 procedures including a new key towards a UE if a NAS Security Mode Command procedure is ongoing with the UE.\n> 2. The AMF shall not initiate a NAS Security Mode Command towards a UE if one of the N2 procedures including a new key is ongoing with the UE.\"\n\nFree5GC AMF uses an `OnGoing` state tracking mechanism (`SetOnGoing()`, `GetOnGoing()`) with `OnGoingProcedureN2Handover` type. However, the cross-procedure checks required by §6.9.5.1 are not implemented:\n\n**Rule 2 violation:**\n`SecurityMode()` in `internal/gmm/sm.go` sends SMC on `EntryEvent` without checking if N2 handover is ongoing.\n\n**Rule 1 violation:**\n`handleHandoverRequiredMain()` in `internal/ngap/handler.go` calls `SetOnGoing(OnGoingProcedureN2Handover)` without checking if SMC is ongoing.\n\n**Why NH/NCC and SMC are related:**\n\nSMC activates a new KAMF, which changes the basis for NH key derivation. The N2 HandoverRequest includes NH/NCC derived from the old KAMF. If both procedures run concurrently, the target gNB and UE derive different KgNB keys, breaking AS security.\n\n### PoC\n\n**Source code evidence:**\n\nFree5GC AMF `internal/gmm/sm.go` — `SecurityMode()`:\n```go\nfunc SecurityMode(state *fsm.State, event fsm.EventType, args fsm.ArgsType) {\n    switch event {\n    case fsm.EntryEvent:\n        // No check for OnGoing N2 procedure\n        // Directly proceeds to SMC\n```\n\nFree5GC AMF `internal/ngap/handler.go` — `handleHandoverRequiredMain()`:\n```go\namfUe.SetOnGoing(sourceUe.Ran.AnType, &context.OnGoing{\n    Procedure: context.OnGoingProcedureN2Handover,\n})\n// No check for ongoing SMC before setting N2\n```\n\n**Packet Evidence (pcap available):**\n\n| Packet | Time | Message | Description |\n|--------|------|---------|-------------|\n| #1 | 0.000s | HandoverRequired | gNB_A requests handover |\n| #18 | 0.002s | **HandoverRequest** | **N2 started (NH/NCC included)** |\n| | | *(no response from gNB_B)* | **N2 ongoing** |\n| #28 | 2.062s | Registration request | UE re-registers (same SUPI) |\n| #63 | 2.069s | Authentication request | |\n| #64 | 2.070s | Authentication response | |\n| #71 | 2.072s | **Security mode command** | **SMC during N2 ongoing = Rule 2 violation** |\n[NGAPHandover-N2-SMC-Concurrent.zip](https://github.com/user-attachments/files/26735421/NGAPHandover-N2-SMC-Concurrent.zip)\n\n\n### Impact\n\n**Integrity (MEDIUM):** Concurrent NAS and AS security procedures can cause security context mismatches between UE, AMF, and gNB. The SMC activates a new KAMF while the N2 HandoverRequest carries NH/NCC derived from the old KAMF, resulting in KgNB derivation mismatch.\n\n**Availability (LOW):** Security context mismatch may cause handover failure or security verification failures.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:A/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/free5gc/amf"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "1.4.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/free5gc/free5gc/security/advisories/GHSA-vrrx-58h3-prmh"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-42082"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/free5gc/amf/blame/v1.4.3/internal/gmm/sm.go"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/free5gc/amf/blame/v1.4.3/internal/ngap/handler.go"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/free5gc/free5gc"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-358" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-07T01:56:13Z",
    "nvd_published_at" : "2026-05-27T17:16:35Z"
  }
}