Skip to main content

free5GC UDR CVE-2026-40343

MEDIUM
Improper Check for Unusual or Exceptional Conditions (CWE-754)
2026-04-21 https://github.com/free5gc/free5gc GHSA-jwch-w7wh-gqjm
6.9
CVSS 4.0 · Vendor: https://github.com/free5gc/free5gc
View

Attack ChainAIDerived

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

  1. Access
    Craft malformed HTTP POST
  2. Delivery
    Send to /nudr-dr/v2/policy-data/subs-to-notify
  3. Exploit
    Trigger GetRawData or Deserialize failure
  4. Execution
    Handler sends error response but continues
  5. Persist
    Processor receives uninitialized object
  6. Impact
    Subscription persisted or behavior unexpected

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A10:2025 - Mishandling of Exceptional Conditions
ASVS 5.0
V16 - Security Logging and Error Handling Unusual condition handling
Exploitation Conditions

Network-accessible POST endpoint with no authentication requirement at the HTTP handler layer. The exploit requires sending a request with either (1) a truncated or missing body (triggering GetRawData failure), or (2) malformed JSON (triggering deserialization failure). No special client certificates, API keys, or prior authentication are needed. The endpoint must be reachable from the attacker's network (typically true for UDR deployed in a 5G core network slice). The exact impact depends on downstream processor behavior: if the processor validates the subscription object before storing it, the exploit may result only in harmless error logging; if the processor naively creates records, unintended subscriptions will be persisted. Exploitation does NOT require default configuration or specific product features - the flaw exists in all deployments of the affected UDR handler code.

Impact

This vulnerability presents a moderate real-world risk despite lacking a CVSS score and EPSS data. The attack vector is network-based (POST to a publicly routed API endpoint), the attack complexity is low (sending malformed JSON or truncating the request body requires no special skills), and no authentication is explicitly required at the HTTP handler layer - exploitation is achievable by any network-adjacent attacker. The advisory does not mention CISA KEV listing or public proof-of-concept code, indicating this is not yet confirmed as actively exploited in the wild. However, the logic flaw is trivial to trigger (send a request with Content-Length: 0 or invalid JSON) and the impact is not merely denial of service but potential data inconsistency in a critical 5G infrastructure component. The real-world severity depends on downstream processor validation: if the processor naively creates a subscription record with null or default values, attackers could flood the system with junk subscriptions, pollute audit logs, or trigger unexpected state transitions in the UDR. If the processor performs strict validation, the attack may fail silently with minimal impact. The absence of a CVSS score is notable and may reflect debate over whether the flaw is a design error or a security issue; this ambiguity warrants conservative treatment until downstream impact is fully characterized. The static code-path confirmation (mentioned in the description) elevates confidence that the flaw is real and not a false positive.

Exploit ScenarioDerived

An attacker sends a POST request to /nudr-dr/v2/policy-data/subs-to-notify with a Content-Length header set to 0 or a truncated request body, causing GetRawData() to fail. The handler sends an HTTP 500 response but continues execution (due to missing return), invokes the processor with an uninitialized PolicyDataSubscription object, and the processor may create a subscription record with default or garbage values in the UDR database. The attacker repeats this with invalid JSON payloads (triggering deserialization failure) to create additional malformed subscription entries, causing data inconsistency and potential cascading failures in dependent 5G network functions that query the UDR.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
No patch listed yet 0.0% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Apr 21, 2026

Fail-open request handling in free5GC UDR's POST /nudr-dr/v2/policy-data/subs-to-notify endpoint allows Policy Data notification subscriptions to be created with invalid, empty, or partially processed input after HTTP body read or deserialization failures. The handler fails to return after sending error responses (HTTP 500 for body read failure, HTTP 400 for deserialization failure), causing execution to continue and invoke the subscription processor with an uninitialized or malformed PolicyDataSubscription object. This is a logic flaw rather than memory corruption or remote code execution, but it violates fail-secure design principles for a write-capable API and may result in inconsistent subscription state or unintended database entries depending on downstream validation behavior.

RemediationAI

Apply the upstream patch from the free5GC project, which adds explicit return statements after error responses in the HandlePolicyDataSubsToNotifyPost function. The minimal fix requires inserting return statements immediately after the c.JSON(http.StatusInternalServerError, pd) call (for GetRawData errors) and the c.JSON(http.StatusBadRequest, pd) call (for deserialization errors). Additionally, modify the deserialization call to pass a pointer: change openapi.Deserialize(policyDataSubscription, reqBody, "application/json") to openapi.Deserialize(&policyDataSubscription, reqBody, "application/json"). Update free5GC UDR to the patched version once released. For deployed 5G networks that cannot immediately patch, implement network-layer controls: filter malformed HTTP requests at ingress (e.g., via API gateway validation of Content-Length and Content-Type headers), rate-limit POST requests to /nudr-dr/v2/policy-data/subs-to-notify to mitigate subscription flooding, and enable detailed logging of failed deserialization attempts to detect attack attempts. These compensating controls do not eliminate the logic flaw but reduce the attack surface and provide visibility into exploitation attempts. Note that network filtering may introduce latency or false positives on legitimate but edge-case requests.

Affected Packages

go github.com/free5gc/udr no fix

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in go

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

Technical ContextAI · show details

The vulnerability exists in free5GC UDR, an implementation of the 3GPP Unified Data Repository (UDR) microservice, which serves as a central data store in 5G networks. The affected endpoint is part of the Policy Data API (NUDR-DR v2), responsible for managing notification subscriptions. The root cause (CWE-754: Improper Check for Unusual or Exceptional Conditions) occurs in the Go handler function HandlePolicyDataSubsToNotifyPost in NFs/udr/internal/sbi/api_datarepository.go. The function calls c.GetRawData() to retrieve the HTTP request body and openapi.Deserialize(policyDataSubscription, reqBody, "application/json") to parse it. Both calls can fail: GetRawData() fails if the client closes the connection or sends a malformed Content-Length header; Deserialize() fails if the JSON is invalid or doesn't match the PolicyDataSubscription schema. The handler sends appropriate HTTP error responses but lacks return statements, allowing control flow to continue to the processor invocation. Additionally, the deserialization call passes the object by value rather than by pointer, compounding the risk of processing garbage or zero-initialized data.

Know when the next one hits your stack

  • 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

Vendor (https://github.com/free5gc/free5gc) PRIMARY 6.9 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:L/SA:N
SUSE MEDIUM

Primary rating from Vendor (https://github.com/free5gc/free5gc).

CVSS VectorVendor: https://github.com/free5gc/free5gc

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
Low
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
Low
Subsequent system: Availability
None

Lifecycle Timeline

2
CVSS changed
Apr 22, 2026 - 00:22 NVD
6.9 (MEDIUM)
CVE Published
Apr 21, 2026 - 19:05 nvd
MEDIUM 6.9

DescriptionCVE.org

Summary

A fail-open request handling flaw in the UDR service causes the /nudr-dr/v2/policy-data/subs-to-notify POST handler to continue processing requests even after request body retrieval or deserialization errors.

This may allow unintended creation of Policy Data notification subscriptions with invalid, empty, or partially processed input, depending on downstream processor behavior.

Details

The endpoint POST /nudr-dr/v2/policy-data/subs-to-notify is intended to create a Policy Data notification subscription only after the HTTP request body has been successfully read and parsed into a valid PolicyDataSubscription object. [file:93]

In the free5GC UDR implementation, the function HandlePolicyDataSubsToNotifyPost in NFs/udr/internal/sbi/api_datarepository.go does not terminate execution after input-processing failures. [file:93]

The request flow is:

  1. The handler calls c.GetRawData() to read the HTTP request body. [file:93]
  2. If GetRawData() fails, the handler sends an HTTP 500 error response, but does not return. [file:93]
  3. The handler then calls openapi.Deserialize(policyDataSubscription, reqBody, "application/json"). [file:93]
  4. If deserialization fails, the handler sends an HTTP 400 error response, but again does not return. [file:93]
  5. Execution continues and the handler still invokes s.Processor().PolicyDataSubsToNotifyPostProcedure(c,policyDataSubscription). [file:93]

As a result, the endpoint operates in a fail-open manner: request processing may continue after fatal input validation or body handling errors, instead of being safely aborted. [file:93]

This differs from safer handlers in the same file, which use a helper pattern that explicitly returns on body read or deserialization failure before calling the corresponding processor routine. [file:93]

Security Impact

This issue affects a write-capable API that creates Policy Data notification subscriptions. [file:93] Because execution continues after body read or parsing failure, the processor may receive an uninitialized, partially initialized, or otherwise unintended PolicyDataSubscription object. [file:93]

The exact runtime impact depends on downstream processor behavior and storage validation. [file:93] At minimum, this is a security-relevant robustness flaw that can lead to inconsistent request handling; under certain runtime conditions it may allow creation of invalid or unintended subscription state. [file:93]

Reproduction Status

The code path has been statically confirmed. [file:93] A complete runtime proof of unintended subscription creation after GetRawData() or deserialization failure has not yet been established. [file:93]

Patch

The handler should immediately terminate after sending an error response for body read or deserialization failure. [file:93]

A minimal fix is to add missing return statements in HandlePolicyDataSubsToNotifyPost:

go
reqBody, err := c.GetRawData()
if err != nil {
    logger.DataRepoLog.Errorf("Get Request Body error: %+v", err)
    pd := openapi.ProblemDetailsSystemFailure(err.Error())
    c.Set(sbi.IN_PB_DETAILS_CTX_STR, pd.Cause)
    c.JSON(http.StatusInternalServerError, pd)
    return
}

err = openapi.Deserialize(&policyDataSubscription, reqBody, "application/json")
if err != nil {
    logger.DataRepoLog.Errorf("Deserialize Request Body error: %+v", err)
    pd := util.ProblemDetailsMalformedReqSyntax(err.Error())
    c.Set(sbi.IN_PB_DETAILS_CTX_STR, pd.Cause)
    c.JSON(http.StatusBadRequest, pd)
    return
}

Additionally, the deserialization call should pass a pointer to the destination object so that the parsed body is written into the intended structure. [file:93]

###Details The issue is compounded by the handler's deserialization call, which passes policyDataSubscription directly to openapi.Deserialize(...) instead of passing a pointer to the destination object. This inconsistent usage further increases the risk that request processing continues with an empty, partially initialized, or otherwise unintended subscription object. [file:93]

Threat Intelligence Overview

EPSS Score
0.0%
Top 89% exploitable
Threat Intel
1
1 source
Data Quality
7 sources
Confidence: High
NVD CVE.org EPSS Vulnrichment GHSA Vendor GitHub VulDB

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 No
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
None
System Exposure· derived
Open
Automatable
Yes
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

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

Attack Technique

Insecure deserialization occurs when an application converts serialized data (a stream of bytes representing an object's state) back into a living object without proper validation.

Affected Products (CPE)CVE.org

pkg:go/github.com_free5gc_udr

Vendor StatusVendor

SUSE

Severity: Moderate
Product Status
SUSE Linux Enterprise Server 16.1 Affected
SUSE Linux Enterprise Server for SAP applications 16.1 Affected
SUSE Linux Enterprise Module for Package Hub 15 SP5 Affected
SUSE Linux Enterprise Module for Package Hub 15 SP6 Affected
openSUSE Leap 15.5 Affected

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