diff --git a/advisories/github-reviewed/2025/04/GHSA-hcrc-79hj-m3qh/GHSA-hcrc-79hj-m3qh.json b/advisories/github-reviewed/2025/04/GHSA-hcrc-79hj-m3qh/GHSA-hcrc-79hj-m3qh.json new file mode 100644 index 00000000000..f1d5f3fab7f --- /dev/null +++ b/advisories/github-reviewed/2025/04/GHSA-hcrc-79hj-m3qh/GHSA-hcrc-79hj-m3qh.json @@ -0,0 +1,61 @@ +{ + "schema_version": "1.4.0", + "id": "GHSA-hcrc-79hj-m3qh", + "modified": "2025-04-22T16:53:39Z", + "published": "2025-04-22T16:53:39Z", + "aliases": [ + "CVE-2025-24016" + ], + "summary": "Wazuh server vulnerable to remote code execution", + "details": "### Summary\nAn unsafe deserialization vulnerability allows for remote code execution on Wazuh servers. \nThe vulnerability can be triggered by anybody with API access (compromised dashboard or Wazuh servers in the cluster) or, in certain configurations, even by a compromised agent.\n\n### Details\nDistributedAPI parameters are a serialized as JSON and deserialized using `as_wazuh_object` (in `framework/wazuh/core/cluster/common.py`). If an attacker manages to inject an unsanitized dictionary in DAPI request/response, they can forge an unhandled exception (`__unhandled_exc__`) to evaluate arbitrary python code. \n\nUsing the server API, it quite easy to trigger. For example, using the `run_as` endpoint (implemented by `run_as_login` in `api/api/controllers/security_controller.py`): the `auth_context` argument is completely controlled by the attacker, and is forwarded to the master server to handle. By sending a malicious `run_as` request to a worker server, it is possible to execute code on the master server.\n\nIt is also possible to exploit the bug as a compromised agent, in certain configurations. \nA compromised agent can respond to a `getconfig` request with a malicious JSON object (containing a serialized unhandled exception). If the `getconfig` request was caused because of a server API request to `/agents/{agent_id}/config/{component}/{configuration}` (`api.controllers.agent_controller.get_agent_config`), and the agent is managed by a server other than the one that received the server API request, the unsafe deserialization will occur on the server that received the original server API request.\n\n```\nuser server A server B agent\n | | | |\n | -get-config-> | | |\n | | --get-config-dapi-> | |\n | | | --getconf-> |\n | | | <-payload-- |\n | X <-----payload------ | |\n | | | |\n```\n\nIt is likely that there are more ways to reach the unsafe deserialization function (`as_wazuh_object`), some of them might even be accessible from different contexts (without credentials, or initiated by a compromised agent). I suggest fixing the root cause instead of attempting to sanitize inputs that reach it. Note that there are multiple other ways to execute arbitrary code in `as_wazuh_object`, easier by using a `__callable__`, or potentially abusing callable gadgets in `exception`, `wresults` or `Wazuh`.\n\n### PoC\nTo trigger using the server API (assuming default credentials): \n```bash\ncurl -X POST -k -u \"wazuh-wui:MyS3cr37P450r.*-\" -H \"Content-Type: application/json\" --data '{\"__unhandled_exc__\":{\"__class__\": \"exit\", \"__args__\": []}}' https://:55000/security/user/authenticate/run_as\n```\nthis will shut down the master server.\n\n### Impact\nThis is a remote code execution on Wazuh server, affecting the latest version (v4.9.0 at this time)", + "severity": [ + { + "type": "CVSS_V3", + "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:H/A:H" + } + ], + "affected": [ + { + "package": { + "ecosystem": "Go", + "name": "github.com/wazuh/wazuh" + }, + "ranges": [ + { + "type": "ECOSYSTEM", + "events": [ + { + "introduced": "4.4.0" + }, + { + "fixed": "4.9.1" + } + ] + } + ] + } + ], + "references": [ + { + "type": "WEB", + "url": "https://github.com/wazuh/wazuh/security/advisories/GHSA-hcrc-79hj-m3qh" + }, + { + "type": "ADVISORY", + "url": "https://nvd.nist.gov/vuln/detail/CVE-2025-24016" + }, + { + "type": "PACKAGE", + "url": "https://github.com/wazuh/wazuh" + } + ], + "database_specific": { + "cwe_ids": [ + "CWE-502" + ], + "severity": "CRITICAL", + "github_reviewed": true, + "github_reviewed_at": "2025-04-22T16:53:39Z", + "nvd_published_at": "2025-02-10T20:15:42Z" + } +} \ No newline at end of file diff --git a/advisories/github-reviewed/2025/04/GHSA-x27v-f838-jh93/GHSA-x27v-f838-jh93.json b/advisories/github-reviewed/2025/04/GHSA-x27v-f838-jh93/GHSA-x27v-f838-jh93.json new file mode 100644 index 00000000000..238f120efaa --- /dev/null +++ b/advisories/github-reviewed/2025/04/GHSA-x27v-f838-jh93/GHSA-x27v-f838-jh93.json @@ -0,0 +1,84 @@ +{ + "schema_version": "1.4.0", + "id": "GHSA-x27v-f838-jh93", + "modified": "2025-04-22T16:55:13Z", + "published": "2025-04-22T16:55:13Z", + "aliases": [ + "CVE-2025-32951" + ], + "summary": "io.jmix.rest:jmix-rest allows XSS in the /files Endpoint of the Generic REST API", + "details": "### Impact\n\nThe input parameter, which consists of a file path and name, can be manipulated to return the Content-Type header with text/html if the name part ends with .html. This could allow malicious JavaScript code to be executed in the browser. For a successful attack, a malicious file needs to be uploaded beforehand.\n\nThe severity of the vulnerability is mitigated by the fact that the application UI and the generic REST API are typically accessible only to authenticated users. Additionally, the /files endpoint in Jmix requires specific permissions and is disabled by default. \n\n### Patches\n\nThe problem has been fixed in Jmix 1.6.2+ and 2.4.0+.\n\n### Workarounds\n\nA workaround for those who are unable to upgrade: [Disable Files Endpoint in Jmix Application](https://docs.jmix.io/jmix/files-vulnerabilities.html#disable-files-endpoint-in-jmix-application).", + "severity": [ + { + "type": "CVSS_V3", + "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:N" + } + ], + "affected": [ + { + "package": { + "ecosystem": "Maven", + "name": "io.jmix.rest:jmix-rest" + }, + "ranges": [ + { + "type": "ECOSYSTEM", + "events": [ + { + "introduced": "1.0.0" + }, + { + "fixed": "1.6.2" + } + ] + } + ] + }, + { + "package": { + "ecosystem": "Maven", + "name": "io.jmix.rest:jmix-rest" + }, + "ranges": [ + { + "type": "ECOSYSTEM", + "events": [ + { + "introduced": "2.0.0" + }, + { + "fixed": "2.4.0" + } + ] + } + ] + } + ], + "references": [ + { + "type": "WEB", + "url": "https://github.com/jmix-framework/jmix/security/advisories/GHSA-x27v-f838-jh93" + }, + { + "type": "WEB", + "url": "https://docs.jmix.io/jmix/files-vulnerabilities.html" + }, + { + "type": "WEB", + "url": "https://docs.jmix.io/jmix/files-vulnerabilities.html#disable-files-endpoint-in-jmix-application" + }, + { + "type": "PACKAGE", + "url": "https://github.com/jmix-framework/jmix" + } + ], + "database_specific": { + "cwe_ids": [ + "CWE-79" + ], + "severity": "LOW", + "github_reviewed": true, + "github_reviewed_at": "2025-04-22T16:55:13Z", + "nvd_published_at": null + } +} \ No newline at end of file