diff --git a/advisories/github-reviewed/2025/04/GHSA-5q9x-554g-9jgg/GHSA-5q9x-554g-9jgg.json b/advisories/github-reviewed/2025/04/GHSA-5q9x-554g-9jgg/GHSA-5q9x-554g-9jgg.json new file mode 100644 index 00000000000..6d01457891d --- /dev/null +++ b/advisories/github-reviewed/2025/04/GHSA-5q9x-554g-9jgg/GHSA-5q9x-554g-9jgg.json @@ -0,0 +1,97 @@ +{ + "schema_version": "1.4.0", + "id": "GHSA-5q9x-554g-9jgg", + "modified": "2025-04-11T14:09:37Z", + "published": "2025-04-11T14:09:37Z", + "aliases": [], + "summary": "SurrealDB bypass of deny-net flags via redirect results in server-side request forgery (SSRF)", + "details": "SurrealDB offers http functions that can access external network endpoints. A typical, albeit [not recommended ](https://surrealdb.com/docs/surrealdb/reference-guide/security-best-practices#example-deny-all-capabilities-with-some-exceptions) configuration would be to start SurrealDB with all network connections allowed with the exception of a deny list. For example, `surreal start --allow-net --deny-net 10.0.0.0/8` will allow all network connections except to the 10.0.0.0/8 block.\n\nAn authenticated user of SurrealDB can use redirects to bypass this restriction. For example by hosting a server on the public internet which redirects to the IP addresses blocked by the administrator of the SurrealDB server via HTTP 301 or 307 response codes. \n\nWhen sending SurrealDB statements containing the `http::*` functions to the attacker controlled host, the SurrealDB server will follow the redirects to the blocked IP address. Because the statements also return the responses to the attacker, this issue constitutes a full SSRF vulnerability.\n\nThis issue was discovered and patched during an code audit and penetration test of SurrealDB by cure53, the severity as defined within cure53's preliminary finding is Medium, matched by our CVSS v4 assessment.\n\n### Impact\n\nThe impact of this vulnerability is circumvention of the `--deny-net` capability and resulting impact on systems external to SurrealDB. The ultimate impact is dependent on the deployment scenario. \n\nFor example, if the SurrealDB server blocks requests to internal and private IP addresses because they run services which don't require authentication, such as AWS deployments using IMDSv1, the attacker can access these internal endpoints directly, and potentially retrieve or even alter sensitive information and credentials.\n\nThe circumvention could also be used to redirect traffic to the SurrealDB port, providing a low level of impact to availability. \n\n### Patches\nA patch has been created that adds an HTTP redirect limit, and checks HTTP redirects against allowed network targets, preventing redirections to disallowed uri's.\n\n- Versions 2.0.5, 2.1.5, 2.2.2 and later are not affected by this issue.\n\n### Workarounds\nThe possibility of this vulnerability being exploited can be reduced by following an allowlist approach to enabling the http capability `surreal start --allow-net 10.0.0.0/8 ` or using the equivalent `SURREAL_CAPS_ALLOW_NET` environment variable, where endpoints allowed are fully trusted and are not controlled by regular users.\n\nThe network access capability can be disabled, using `--deny-net` or the equivalent `SURREAL_CAPS_DENY_NET` environment variable without specifying targets, with impact to SurrealDB functionality.\n\nAs the impact of this vulnerability depends on the security of the deployment environment of SurrealDB, best practices should be followed within that environment.\n\n\n### References\n[#5597](https://github.com/surrealdb/surrealdb/pull/5597)\n[SurrealDB Documentation - Environment Variables](https://surrealdb.com/docs/surrealdb/cli/env)\n[SurrealDB Documentation - Capabilities](https://surrealdb.com/docs/surrealdb/security/capabilities)\n[SurrealDB Documentation - Network Access Capability](https://surrealdb.com/docs/surrealdb/security/capabilities#network)", + "severity": [ + { + "type": "CVSS_V4", + "score": "CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:N/VI:L/VA:L/SC:H/SI:H/SA:H" + } + ], + "affected": [ + { + "package": { + "ecosystem": "crates.io", + "name": "surrealdb" + }, + "ranges": [ + { + "type": "ECOSYSTEM", + "events": [ + { + "introduced": "2.2.0" + }, + { + "fixed": "2.2.2" + } + ] + } + ] + }, + { + "package": { + "ecosystem": "crates.io", + "name": "surrealdb" + }, + "ranges": [ + { + "type": "ECOSYSTEM", + "events": [ + { + "introduced": "2.1.0" + }, + { + "fixed": "2.1.5" + } + ] + } + ] + }, + { + "package": { + "ecosystem": "crates.io", + "name": "surrealdb" + }, + "ranges": [ + { + "type": "ECOSYSTEM", + "events": [ + { + "introduced": "0" + }, + { + "fixed": "2.0.5" + } + ] + } + ] + } + ], + "references": [ + { + "type": "WEB", + "url": "https://github.com/surrealdb/surrealdb/security/advisories/GHSA-5q9x-554g-9jgg" + }, + { + "type": "WEB", + "url": "https://github.com/surrealdb/surrealdb/pull/5597" + }, + { + "type": "PACKAGE", + "url": "https://github.com/surrealdb/surrealdb" + } + ], + "database_specific": { + "cwe_ids": [ + "CWE-918" + ], + "severity": "MODERATE", + "github_reviewed": true, + "github_reviewed_at": "2025-04-11T14:09:37Z", + "nvd_published_at": null + } +} \ No newline at end of file diff --git a/advisories/github-reviewed/2025/04/GHSA-pxw4-94j3-v9pf/GHSA-pxw4-94j3-v9pf.json b/advisories/github-reviewed/2025/04/GHSA-pxw4-94j3-v9pf/GHSA-pxw4-94j3-v9pf.json new file mode 100644 index 00000000000..d21f60a5191 --- /dev/null +++ b/advisories/github-reviewed/2025/04/GHSA-pxw4-94j3-v9pf/GHSA-pxw4-94j3-v9pf.json @@ -0,0 +1,97 @@ +{ + "schema_version": "1.4.0", + "id": "GHSA-pxw4-94j3-v9pf", + "modified": "2025-04-11T14:09:14Z", + "published": "2025-04-11T14:09:14Z", + "aliases": [], + "summary": "SurrealDB CPU exhaustion via custom functions result in total DoS", + "details": "SurrealDB allows authenticated users with `OWNER` or `EDITOR` permissions at the root, database or namespace levels to define their own database functions using the `DEFINE FUNCTION` statement\n\nA custom database function comprises a name together with a function body. In the function body, the user programs the functionality of the function in terms of SurrealQL. The language includes a `FOR` keyword, used to implement for-loops.\n\nWhilst the parser and interpreter constrain the number of iterations for a single for-loop, nesting several for-loops with a large number of iterations is possible. Thus, an attacker could define a function that comprises several nested for-loops with an iteration count of 1.000.000 each. \n\nExecuting the function will consume all the CPU time of the server, timeouts configured will not break the CPU consumption, and the function execution monopolizes all CPU time of the SurrealDB server, effectively preventing the server from executing functions, queries, commands of other users, or allowing further connections being established to the server.\n\nTerminating the stuck server requires manual intervention which forces a quit on the server process, as the server application is not responsive any longer.\n\nThis issue was discovered and patched during an code audit and penetration test of SurrealDB by cure53, the severity defined within cure53's preliminary finding is high, matched by our CVSS v4 assessment.\n\n### Impact\nDenial of Service vulnerability resulting in a stuck SurrealDB server requiring manual restart.\n\n### Patches\nA patch has been introduced that adds a check in the `ForEachStatement` that checks if the context has been cancelled or timed out for every iteration.\n\n- Versions 2.0.5, 2.1.5, 2.2.2, and later are not affected by this issue.\n\n### Workarounds\nFor SurrealDB users that are unable to upgrade, consider setting the `--allow-functions` and/or `--deny-functions` options or corresponding `SURREAL_CAPS_ALLOW_FUNC` and/or `SURREAL_CAPS_DENY_FUNC` environment variables, documented within [capabilities](https://surrealdb.com/docs/surrealdb/security/capabilities#functions), to either block all custom functions, or only allow trusted functions to execute. \n\n\n### References\n[SurrealQL Documentation - DEFINE FUNCTION Statement](https://surrealdb.com/docs/surrealql/statements/define/function)\n[SurrealQL Documentation - FOR Statement](https://surrealdb.com/docs/surrealql/statements/for)\n[SurrealDB Documentation - Capabilities](https://surrealdb.com/docs/surrealdb/security/capabilities#functions)\n[SurrealDB Documentation - Environment variables](https://surrealdb.com/docs/surrealdb/cli/env#command-environment-variables)\n[#5597](https://github.com/surrealdb/surrealdb/pull/5597)", + "severity": [ + { + "type": "CVSS_V4", + "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N" + } + ], + "affected": [ + { + "package": { + "ecosystem": "crates.io", + "name": "surrealdb" + }, + "ranges": [ + { + "type": "ECOSYSTEM", + "events": [ + { + "introduced": "2.2.0" + }, + { + "fixed": "2.2.2" + } + ] + } + ] + }, + { + "package": { + "ecosystem": "crates.io", + "name": "surrealdb" + }, + "ranges": [ + { + "type": "ECOSYSTEM", + "events": [ + { + "introduced": "2.1.0" + }, + { + "fixed": "2.1.5" + } + ] + } + ] + }, + { + "package": { + "ecosystem": "crates.io", + "name": "surrealdb" + }, + "ranges": [ + { + "type": "ECOSYSTEM", + "events": [ + { + "introduced": "0" + }, + { + "fixed": "2.0.5" + } + ] + } + ] + } + ], + "references": [ + { + "type": "WEB", + "url": "https://github.com/surrealdb/surrealdb/security/advisories/GHSA-pxw4-94j3-v9pf" + }, + { + "type": "WEB", + "url": "https://github.com/surrealdb/surrealdb/pull/5597" + }, + { + "type": "PACKAGE", + "url": "https://github.com/surrealdb/surrealdb" + } + ], + "database_specific": { + "cwe_ids": [ + "CWE-835" + ], + "severity": "HIGH", + "github_reviewed": true, + "github_reviewed_at": "2025-04-11T14:09:14Z", + "nvd_published_at": null + } +} \ No newline at end of file diff --git a/advisories/unreviewed/2025/04/GHSA-xfq9-hh5x-xfq9/GHSA-xfq9-hh5x-xfq9.json b/advisories/github-reviewed/2025/04/GHSA-xfq9-hh5x-xfq9/GHSA-xfq9-hh5x-xfq9.json similarity index 55% rename from advisories/unreviewed/2025/04/GHSA-xfq9-hh5x-xfq9/GHSA-xfq9-hh5x-xfq9.json rename to advisories/github-reviewed/2025/04/GHSA-xfq9-hh5x-xfq9/GHSA-xfq9-hh5x-xfq9.json index e8bcaec98b1..aa61f42b287 100644 --- a/advisories/unreviewed/2025/04/GHSA-xfq9-hh5x-xfq9/GHSA-xfq9-hh5x-xfq9.json +++ b/advisories/github-reviewed/2025/04/GHSA-xfq9-hh5x-xfq9/GHSA-xfq9-hh5x-xfq9.json @@ -1,11 +1,12 @@ { "schema_version": "1.4.0", "id": "GHSA-xfq9-hh5x-xfq9", - "modified": "2025-04-10T18:32:03Z", + "modified": "2025-04-11T14:09:51Z", "published": "2025-04-10T18:32:03Z", "aliases": [ "CVE-2025-24866" ], + "summary": "Mattermost Fails to Enforce Proper Access Controls on `/api/v4/audits` Endpoint", "details": "Mattermost versions 9.11.x <= 9.11.8  fail to enforce proper access controls on the /api/v4/audits endpoint, allowing users with delegated granular administration roles who lack access to Compliance Monitoring to retrieve User Activity Logs.", "severity": [ { @@ -13,12 +14,36 @@ "score": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:L/I:N/A:N" } ], - "affected": [], + "affected": [ + { + "package": { + "ecosystem": "Go", + "name": "github.com/mattermost/mattermost/server/v8" + }, + "ranges": [ + { + "type": "ECOSYSTEM", + "events": [ + { + "introduced": "9.11.0" + }, + { + "fixed": "9.11.9" + } + ] + } + ] + } + ], "references": [ { "type": "ADVISORY", "url": "https://nvd.nist.gov/vuln/detail/CVE-2025-24866" }, + { + "type": "PACKAGE", + "url": "https://github.com/mattermost/mattermost" + }, { "type": "WEB", "url": "https://mattermost.com/security-updates" @@ -29,8 +54,8 @@ "CWE-863" ], "severity": "LOW", - "github_reviewed": false, - "github_reviewed_at": null, + "github_reviewed": true, + "github_reviewed_at": "2025-04-11T14:09:51Z", "nvd_published_at": "2025-04-10T16:15:27Z" } } \ No newline at end of file