Skip to content

Commit a8d3b4b

Browse files
1 parent 9ed9989 commit a8d3b4b

7 files changed

Lines changed: 473 additions & 0 deletions

File tree

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
{
2+
"schema_version": "1.4.0",
3+
"id": "GHSA-6qvv-pj99-48qm",
4+
"modified": "2026-04-14T20:01:28Z",
5+
"published": "2026-04-14T20:01:28Z",
6+
"aliases": [
7+
"CVE-2026-40255"
8+
],
9+
"summary": "URL Redirection to Untrusted Site ('Open Redirect') in @adonisjs/http-server",
10+
"details": "### Impact\n\nThe `response.redirect().back()` method in `@adonisjs/http-server` is vulnerable to open redirects. The method reads the `Referer` header from the incoming HTTP request and redirects to that URL without validating the host. An attacker who can influence the `Referer` header (for example, by linking a user through an attacker-controlled page before a form submission) can cause the application to redirect users to a malicious external site.\n\nThis affects all AdonisJS applications that use `response.redirect().back()` or `response.redirect('back')`.\n\nThe vulnerability is classified as CWE-601: URL Redirection to Untrusted Site ('Open Redirect').\n\n### Patches\n\nThis has been fixed in `@adonisjs/http-server` version **8.2.0**. The `back()` method now validates the `Referer` header's host against the request's own `Host` header. Referrers from unrecognized hosts are rejected and the redirect falls back to `/` (or a developer-provided fallback URL).\n\nApplications that operate across multiple domains can configure additional trusted hosts via the `redirect.allowedHosts` option in `config/app.ts`.\n\nUsers should upgrade to `@adonisjs/http-server@^8.2.0` (or `@adonisjs/core@^7.4.0` if using the core meta-package).\n\n### Workarounds\n\nIf upgrading is not immediately possible, avoid using `response.redirect().back()` in routes that are reachable by unauthenticated users or from pages that accept external traffic. Instead, redirect to a known safe path explicitly using `response.redirect().toPath('/dashboard')`.\n\n### References\n\n- [CWE-601: URL Redirection to Untrusted Site](https://cwe.mitre.org/data/definitions/601.html)\n- [OWASP: Unvalidated Redirects and Forwards](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html)",
11+
"severity": [
12+
{
13+
"type": "CVSS_V3",
14+
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"
15+
}
16+
],
17+
"affected": [
18+
{
19+
"package": {
20+
"ecosystem": "npm",
21+
"name": "@adonisjs/http-server"
22+
},
23+
"ranges": [
24+
{
25+
"type": "ECOSYSTEM",
26+
"events": [
27+
{
28+
"introduced": "8.0.0-next.0"
29+
},
30+
{
31+
"fixed": "8.2.0"
32+
}
33+
]
34+
}
35+
]
36+
},
37+
{
38+
"package": {
39+
"ecosystem": "npm",
40+
"name": "@adonisjs/core"
41+
},
42+
"ranges": [
43+
{
44+
"type": "ECOSYSTEM",
45+
"events": [
46+
{
47+
"introduced": "0"
48+
},
49+
{
50+
"last_affected": "7.3.1"
51+
}
52+
]
53+
}
54+
]
55+
},
56+
{
57+
"package": {
58+
"ecosystem": "npm",
59+
"name": "@adonisjs/http-server"
60+
},
61+
"ranges": [
62+
{
63+
"type": "ECOSYSTEM",
64+
"events": [
65+
{
66+
"introduced": "0"
67+
},
68+
{
69+
"fixed": "7.8.1"
70+
}
71+
]
72+
}
73+
]
74+
}
75+
],
76+
"references": [
77+
{
78+
"type": "WEB",
79+
"url": "https://github.com/adonisjs/http-server/security/advisories/GHSA-6qvv-pj99-48qm"
80+
},
81+
{
82+
"type": "WEB",
83+
"url": "https://github.com/adonisjs/http-server/commit/2008fb6cf4f6f1c0ca5797d57def4d93e1c3de08"
84+
},
85+
{
86+
"type": "PACKAGE",
87+
"url": "https://github.com/adonisjs/http-server"
88+
},
89+
{
90+
"type": "WEB",
91+
"url": "https://github.com/adonisjs/http-server/releases/tag/v7.8.1"
92+
},
93+
{
94+
"type": "WEB",
95+
"url": "https://github.com/adonisjs/http-server/releases/tag/v8.2.0"
96+
}
97+
],
98+
"database_specific": {
99+
"cwe_ids": [
100+
"CWE-601"
101+
],
102+
"severity": "MODERATE",
103+
"github_reviewed": true,
104+
"github_reviewed_at": "2026-04-14T20:01:28Z",
105+
"nvd_published_at": null
106+
}
107+
}
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
{
2+
"schema_version": "1.4.0",
3+
"id": "GHSA-g9cw-qwhf-24jp",
4+
"modified": "2026-04-14T20:00:24Z",
5+
"published": "2026-04-14T20:00:24Z",
6+
"aliases": [
7+
"CVE-2026-40246"
8+
],
9+
"summary": "free5gc UDR improper path validation allows unauthenticated deletion of Traffic Influence Subscriptions",
10+
"details": "### Summary\nAn improper path validation vulnerability in the UDR service allows any unauthenticated attacker with access to the 5G Service Based Interface (SBI) to delete Traffic Influence Subscriptions by supplying an arbitrary value in place of the expected `subs-to-notify` path segment.\n\n### Details\nThe endpoint `DELETE /nudr-dr/v2/application-data/influenceData/{influenceId}/{subscriptionId}` is intended to only operate on Traffic Influence Subscription resources when `influenceId` is exactly `subs-to-notify`.\n\nIn the free5GC UDR implementation, the path validation is present but ineffective because the handler does not return after sending the HTTP 404 response. The request handling flow is:\n\n1. The function `HandleApplicationDataInfluenceDataSubsToNotifySubscriptionIdDelete` in `./free5gc_4-2-1/free5gc/NFs/udr/internal/sbi/api_datarepository.go` checks whether `influenceId != \"subs-to-notify\"`.\n2. If the value is different, it calls `c.String(http.StatusNotFound, \"404 page not found\")`, **but it does not return afterwards**.\n3. Execution continues and the handler still calls `s.Processor().ApplicationDataInfluenceDataSubsToNotifySubscriptionIdDeleteProcedure(c, subscriptionId)`.\n4. The processor deletes the subscription identified by `subscriptionId` even though the path is invalid and the request should have been rejected.\n\nAs a result, an attacker can send a request to an invalid path, receive an apparent `404 page not found` response, and still successfully delete the target subscription.\n\nThe missing `return` after sending the 404 response in `api_datarepository.go` is the root cause of this vulnerability.\n\n### PoC\nNo authentication is required. Only a valid `subscriptionId` is needed.\n\n```bash\n# Create a subscription to obtain a valid subscriptionId\ncurl -v -X POST \"http://<udr-host>/nudr-dr/v2/application-data/influenceData/subs-to-notify\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"notificationUri\":\"http://evil.com/notify\",\n \"dnns\":[\"internet\"],\n \"supis\":[\"imsi-222777483957498\"]\n }'\n```\nExample response:\n```\nHTTP/1.1 201 Created\n```\n\nThen delete it through an invalid path:\n```bash\ncurl -v -X DELETE \"http://<udr-host>/nudr-dr/v2/application-data/influenceData/WRONGID/87615e16\"\n```\nResponse:\n```\nHTTP/1.1 404 Not Found\n404 page not found\n```\nNow verify that the subscription was actually deleted:\n```bash\ncurl -v \"http://<udr-host>/nudr-dr/v2/application-data/influenceData/subs-to-notify/87615e16\"\n```\nResponse:\n```json\n{\"title\":\"User not found\",\"status\":404,\"cause\":\"USER_NOT_FOUND\"}\n```\n### Impact\nThis is an unauthenticated unauthorized delete vulnerability. Any attacker with network access to the SBI can delete Traffic Influence Subscriptions by knowing or guessing a valid subscriptionId.\n\nThis can disrupt policy-related notification workflows and remove active subscription state from the UDR. In addition, the attack is harder to detect because the API returns a misleading 404 Not Found response even when the deletion is actually performed.\n\nImpacted deployments: any free5GC instance where the SBI is reachable by untrusted parties (e.g., misconfigured network segmentation, rogue NF, or compromised internal host).\n\n### Patch\nThe vulnerability has been confirmed patched by adding the missing return\nstatement in NFs/udr/internal/sbi/api_datarepository.go,\nfunction HandleApplicationDataInfluenceDataSubsToNotifySubscriptionIdDelete:\n```go\nif influenceId != \"subs-to-notify\" {\n c.String(http.StatusNotFound, \"404 page not found\")\n return\n}\n```\nWith the patch applied, requests using an invalid influenceId now correctly\nreturn HTTP 404 and do not delete the targeted subscription.",
11+
"severity": [
12+
{
13+
"type": "CVSS_V4",
14+
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N"
15+
}
16+
],
17+
"affected": [
18+
{
19+
"package": {
20+
"ecosystem": "Go",
21+
"name": "github.com/free5gc/udr"
22+
},
23+
"ranges": [
24+
{
25+
"type": "ECOSYSTEM",
26+
"events": [
27+
{
28+
"introduced": "0"
29+
},
30+
{
31+
"last_affected": "1.4.2"
32+
}
33+
]
34+
}
35+
]
36+
}
37+
],
38+
"references": [
39+
{
40+
"type": "WEB",
41+
"url": "https://github.com/free5gc/free5gc/security/advisories/GHSA-g9cw-qwhf-24jp"
42+
},
43+
{
44+
"type": "PACKAGE",
45+
"url": "https://github.com/free5gc/udr"
46+
}
47+
],
48+
"database_specific": {
49+
"cwe_ids": [
50+
"CWE-285"
51+
],
52+
"severity": "HIGH",
53+
"github_reviewed": true,
54+
"github_reviewed_at": "2026-04-14T20:00:24Z",
55+
"nvd_published_at": null
56+
}
57+
}
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
{
2+
"schema_version": "1.4.0",
3+
"id": "GHSA-gqw4-4w2p-838q",
4+
"modified": "2026-04-14T20:01:42Z",
5+
"published": "2026-04-14T20:01:42Z",
6+
"aliases": [
7+
"CVE-2026-40261"
8+
],
9+
"summary": "Composer has a command injection via malicious perforce reference",
10+
"details": "### Impact\nThe `Perforce::syncCodeBase()` method appended the `$sourceReference` parameter to a shell command without proper escaping, allowing an attacker to inject arbitrary commands through a crafted source reference containing shell metacharacters. Further as in GHSA-wg36-wvj6-r67p / CVE-2026-40176 the `Perforce::generateP4Command()` method constructed shell commands by interpolating user-supplied Perforce connection parameters (port, user, client) without proper escaping from the source url field. Composer would execute these injected commands even if Perforce is not installed.\n\nThe source reference and url are provided as part of package metadata. Any Composer package repository can serve package metadata declaring perforce as a source type with a malicious source reference or source url. This means the vulnerability can be exploited through any package served by a compromised or malicious Composer repository. An attack does not require Perforce to be installed on the client, as Composer will attempt to execute the constructed command regardless.\n\nThis vulnerability is exploitable when installing or updating dependencies from source (`--prefer-source`, default when installing dev prefixed versions), even if you do not use Perforce.\n\n### Patches\nFixed in Composer 2.2.27 (2.2 LTS) and 2.9.6 (mainline)\n\nNote, the fix for the source url in the `Perforce::generateP4Command()` was addressed as part of the patches for GHSA-wg36-wvj6-r67p / CVE-2026-40176 in the same versions.\n\n### Workarounds\n\n- Avoid installing dependencies from source by using `--prefer-dist` or the `preferred-install: dist` config setting.\n- Only use trusted Composer repositories.",
11+
"severity": [
12+
{
13+
"type": "CVSS_V3",
14+
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"
15+
}
16+
],
17+
"affected": [
18+
{
19+
"package": {
20+
"ecosystem": "Packagist",
21+
"name": "composer/composer"
22+
},
23+
"ranges": [
24+
{
25+
"type": "ECOSYSTEM",
26+
"events": [
27+
{
28+
"introduced": "2.3.0"
29+
},
30+
{
31+
"fixed": "2.9.6"
32+
}
33+
]
34+
}
35+
]
36+
},
37+
{
38+
"package": {
39+
"ecosystem": "Packagist",
40+
"name": "composer/composer"
41+
},
42+
"ranges": [
43+
{
44+
"type": "ECOSYSTEM",
45+
"events": [
46+
{
47+
"introduced": "2.0.0"
48+
},
49+
{
50+
"fixed": "2.2.27"
51+
}
52+
]
53+
}
54+
]
55+
}
56+
],
57+
"references": [
58+
{
59+
"type": "WEB",
60+
"url": "https://github.com/composer/composer/security/advisories/GHSA-gqw4-4w2p-838q"
61+
},
62+
{
63+
"type": "PACKAGE",
64+
"url": "https://github.com/composer/composer"
65+
}
66+
],
67+
"database_specific": {
68+
"cwe_ids": [
69+
"CWE-78"
70+
],
71+
"severity": "HIGH",
72+
"github_reviewed": true,
73+
"github_reviewed_at": "2026-04-14T20:01:42Z",
74+
"nvd_published_at": null
75+
}
76+
}
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
{
2+
"schema_version": "1.4.0",
3+
"id": "GHSA-gx38-8h33-pmxr",
4+
"modified": "2026-04-14T20:00:59Z",
5+
"published": "2026-04-14T20:00:59Z",
6+
"aliases": [
7+
"CVE-2026-40249"
8+
],
9+
"summary": "free5gc UDR fail-open request handling in PolicyDataSubsToNotifySubsIdPut may allow unintended subscription updates after input errors",
10+
"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```",
11+
"severity": [
12+
{
13+
"type": "CVSS_V4",
14+
"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"
15+
}
16+
],
17+
"affected": [
18+
{
19+
"package": {
20+
"ecosystem": "Go",
21+
"name": "github.com/free5gc/udr"
22+
},
23+
"ranges": [
24+
{
25+
"type": "ECOSYSTEM",
26+
"events": [
27+
{
28+
"introduced": "0"
29+
},
30+
{
31+
"last_affected": "1.4.2"
32+
}
33+
]
34+
}
35+
]
36+
}
37+
],
38+
"references": [
39+
{
40+
"type": "WEB",
41+
"url": "https://github.com/free5gc/free5gc/security/advisories/GHSA-gx38-8h33-pmxr"
42+
},
43+
{
44+
"type": "PACKAGE",
45+
"url": "https://github.com/free5gc/udr"
46+
}
47+
],
48+
"database_specific": {
49+
"cwe_ids": [
50+
"CWE-636",
51+
"CWE-754"
52+
],
53+
"severity": "MODERATE",
54+
"github_reviewed": true,
55+
"github_reviewed_at": "2026-04-14T20:00:59Z",
56+
"nvd_published_at": null
57+
}
58+
}

0 commit comments

Comments
 (0)