CVE-2026-40249: Github.com/free5gc/udr Free5gc UDR Fail-open Request Handling Vulnerability
MODERATECVE-2026-40249 is a MODERATE (CVSS 5.3) free5gc udr fail-open request handling vulnerability (CWE-636: Not Failing Securely ('Failing Open')) affecting Github.com/free5gc/udr libraries in the Go ecosystem. The issue involves free5gc udr fail-open request handling in policydatasubstonotifysubsidput may allow unintended subscription updates after input errors. Remediation is available in the latest vendor maintenance releases.
CVE-2026-40249 at a Glance
Security Impact
CVSS: 5.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N).
How to Fix CVE-2026-40249
To remediate this vulnerability, upgrade all affected Github.com/free5gc/udr dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/free5gc/udr to Latest secure release
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/free5gc/udr
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-40249, inspect your project dependencies for Github.com/free5gc/udr:
inspect dependencies for github.com/free5gc/udr
Analyze the terminal output to locate any version of Github.com/free5gc/udr 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-636: Not Failing Securely ('Failing Open'), where when the product encounters an error condition or failure, its design requires it to fall back to a state that is less secure than other options that are available, such as selecting the weakest encryption algorithm or using the most permissive access control restrictions. In Github.com/free5gc/udr, 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
CVE-2026-40249 Affected Github.com/free5gc/udr Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/free5gc/udr
|
Go |
≤ 1.4.2
|
|
References
Frequently Asked Questions
What is CVE-2026-40249?
Which Github.com/free5gc/udr versions are affected?
What version fixes CVE-2026-40249?
Is github.com/free5gc/udr affected?
What is the CVSS score of CVE-2026-40249?
What CWE is associated with CVE-2026-40249?
How can I check Go dependencies for CVE-2026-40249?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-gx38-8h33-pmxr",
"modified" : "2026-04-24T20:35:11Z",
"published" : "2026-04-14T20:00:59Z",
"aliases" : [ "CVE-2026-40249" ],
"summary" : "free5gc UDR fail-open request handling in PolicyDataSubsToNotifySubsIdPut may allow unintended subscription updates after input errors",
"details" : "### Summary\nA fail-open request handling flaw in the UDR service causes the `/nudr-dr/v2/policy-data/subs-to-notify/{subsId}` PUT handler to continue processing requests even after request body retrieval or deserialization errors.\n\nThis may allow unintended modification of existing Policy Data notification subscriptions with invalid, empty, or partially processed input, depending on downstream processor behavior.\n\n### Details\nThe endpoint `PUT /nudr-dr/v2/policy-data/subs-to-notify/{subsId}` is intended to update an existing Policy Data notification subscription only after the HTTP request body has been successfully read and parsed into a valid `PolicyDataSubscription` object. [file:93]\n\nIn the free5GC UDR implementation, the function `HandlePolicyDataSubsToNotifySubsIdPut` in`NFs/udr/internal/sbi/api_datarepository.go` does not terminate execution after input-processing failures. [file:93]\n\nThe request flow is:\n\n1. The handler calls `c.GetRawData()` to read the HTTP request body. [file:93]\n2. If `GetRawData()` fails, the handler sends an HTTP 500 error response, but **does not return**. [file:93]\n3. The handler then calls `openapi.Deserialize(policyDataSubscription, reqBody, \"application/json\")`. [file:93]\n4. If deserialization fails, the handler sends an HTTP 400 error response, but again **does not return**. [file:93]\n5. Execution continues and the handler still invokes `s.Processor().PolicyDataSubsToNotifySubsIdPutProcedure(c, subsId, policyDataSubscription)`. [file:93]\n\nAs 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]\n\nThe 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]\n\nThis 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]\n\n### Security Impact\nThis issue affects a write-capable API that updates Policy Data notification subscriptions identified by `subsId`. [file:93] \nBecause execution continues after body read or parsing failure, the processor may receive an uninitialized, partially initialized, or otherwise unintended `PolicyDataSubscription` object for persistence. [file:93]\n\nThe exact runtime impact depends on downstream processor behavior and storage validation. [file:93] \nAt minimum, this is a security-relevant robustness flaw that can lead to inconsistent request handling or unintended modification attempts; under certain runtime conditions it may allow updates that should not be processed after an input error. [file:93]\n\n### Reproduction Status\nThe code path has been statically confirmed. [file:93] A complete runtime proof of unintended subscription modification after\n`GetRawData()` or deserialization failure has not yet been established. [file:93]\n\n### Patch\nThe handler should immediately terminate after sending an error response for body read or deserialization failure. [file:93]\n\nA minimal fix is to add missing `return` statements in `HandlePolicyDataSubsToNotifySubsIdPut` and pass a pointer to the destination\nobject during deserialization: [file:93]\n\n```go\nreqBody, err := c.GetRawData()\nif err != nil {\n logger.DataRepoLog.Errorf(\"Get Request Body error: %+v\", err)\n pd := openapi.ProblemDetailsSystemFailure(err.Error())\n c.Set(sbi.IN_PB_DETAILS_CTX_STR, pd.Cause)\n c.JSON(http.StatusInternalServerError, pd)\n return\n}\n\nerr = openapi.Deserialize(&policyDataSubscription, reqBody, \"application/json\")\nif err != nil {\n logger.DataRepoLog.Errorf(\"Deserialize Request Body error: %+v\", err)\n pd := util.ProblemDetailsMalformedReqSyntax(err.Error())\n c.Set(sbi.IN_PB_DETAILS_CTX_STR, pd.Cause)\n c.JSON(http.StatusBadRequest, pd)\n return\n}\n```",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/free5gc/udr"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "1.4.2"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/free5gc/free5gc/security/advisories/GHSA-gx38-8h33-pmxr"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-40249"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/free5gc/udr"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-636", "CWE-754" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-04-14T20:00:59Z",
"nvd_published_at" : "2026-04-16T22:16:38Z"
}
}