From d12e5191685d6ead5d08189da92ef172db65e57d Mon Sep 17 00:00:00 2001 From: "advisory-database[bot]" <45398580+advisory-database[bot]@users.noreply.github.com> Date: Thu, 21 Nov 2024 22:22:38 +0000 Subject: [PATCH] Publish Advisories GHSA-5cph-wvm9-45gj GHSA-hj3w-wrh4-44vp GHSA-rmxg-6qqf-x8mr --- .../GHSA-5cph-wvm9-45gj.json | 57 +++++++++++++++ .../GHSA-hj3w-wrh4-44vp.json | 64 +++++++++++++++++ .../GHSA-rmxg-6qqf-x8mr.json | 69 +++++++++++++++++++ 3 files changed, 190 insertions(+) create mode 100644 advisories/github-reviewed/2024/11/GHSA-5cph-wvm9-45gj/GHSA-5cph-wvm9-45gj.json create mode 100644 advisories/github-reviewed/2024/11/GHSA-hj3w-wrh4-44vp/GHSA-hj3w-wrh4-44vp.json create mode 100644 advisories/github-reviewed/2024/11/GHSA-rmxg-6qqf-x8mr/GHSA-rmxg-6qqf-x8mr.json diff --git a/advisories/github-reviewed/2024/11/GHSA-5cph-wvm9-45gj/GHSA-5cph-wvm9-45gj.json b/advisories/github-reviewed/2024/11/GHSA-5cph-wvm9-45gj/GHSA-5cph-wvm9-45gj.json new file mode 100644 index 00000000000..b5cec52cbc6 --- /dev/null +++ b/advisories/github-reviewed/2024/11/GHSA-5cph-wvm9-45gj/GHSA-5cph-wvm9-45gj.json @@ -0,0 +1,57 @@ +{ + "schema_version": "1.4.0", + "id": "GHSA-5cph-wvm9-45gj", + "modified": "2024-11-21T22:21:03Z", + "published": "2024-11-21T22:21:03Z", + "aliases": [ + + ], + "summary": "Flowise OverrideConfig security vulnerability", + "details": "### Impact\nFlowise allows developers to inject configuration into the Chainflow during execution through the `overrideConfig` option. This is supported in both the frontend web integration and the backend Prediction API. \n\nThis has a range of fundamental issues that are a **major** security vulnerability. \nWhile this feature is intentional, it should have strong protections added and be disabled by default. \n\nThese issues include: \n1. Remote code execution. While inside a sandbox this allows for\n 1. Sandbox escape \n 2. DoS by crashing the server\n 3. SSRF\n2. Prompt Injection, both System and User\n 1. Full control over LLM prompts\n 2. Server variable and data exfiltration\nAnd many many more such as altering the flow of a conversation, prompt exfiltration via LLM proxying etc.\n\nThese issues are self-targeted and do not persist to other users but do leave the server and business exposed. \nAll issues are shown with the API but also work with the web embed.\n\n### Workarounds\n- `overrideConfig` should be disabled by default\n- `overrideConfig` should have an explicit allow list of variables that are allowed to be modified. This way the user opts-in to where modifications can be made. \n- `vm2` and any forks of it should be removed as in the authors own words, \"fixing the vulnerability seems impossible\". The recommended replacement is https://www.npmjs.com/package/isolated-vm", + "severity": [ + { + "type": "CVSS_V4", + "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N" + } + ], + "affected": [ + { + "package": { + "ecosystem": "npm", + "name": "flowise" + }, + "ranges": [ + { + "type": "ECOSYSTEM", + "events": [ + { + "introduced": "0" + }, + { + "fixed": "2.1.4" + } + ] + } + ] + } + ], + "references": [ + { + "type": "WEB", + "url": "https://github.com/FlowiseAI/Flowise/security/advisories/GHSA-5cph-wvm9-45gj" + }, + { + "type": "PACKAGE", + "url": "https://github.com/FlowiseAI/Flowise" + } + ], + "database_specific": { + "cwe_ids": [ + "CWE-15" + ], + "severity": "HIGH", + "github_reviewed": true, + "github_reviewed_at": "2024-11-21T22:21:03Z", + "nvd_published_at": null + } +} \ No newline at end of file diff --git a/advisories/github-reviewed/2024/11/GHSA-hj3w-wrh4-44vp/GHSA-hj3w-wrh4-44vp.json b/advisories/github-reviewed/2024/11/GHSA-hj3w-wrh4-44vp/GHSA-hj3w-wrh4-44vp.json new file mode 100644 index 00000000000..a86ba91fa96 --- /dev/null +++ b/advisories/github-reviewed/2024/11/GHSA-hj3w-wrh4-44vp/GHSA-hj3w-wrh4-44vp.json @@ -0,0 +1,64 @@ +{ + "schema_version": "1.4.0", + "id": "GHSA-hj3w-wrh4-44vp", + "modified": "2024-11-21T22:20:45Z", + "published": "2024-11-21T22:20:45Z", + "aliases": [ + "CVE-2024-52803" + ], + "summary": "LLama Factory Remote OS Command Injection Vulnerability", + "details": "## Summary\n\nA critical remote OS command injection vulnerability has been identified in the Llama Factory training process. This vulnerability arises from improper handling of user input, allowing malicious actors to execute arbitrary OS commands on the host system. The issue is caused by insecure usage of the `Popen` function with `shell=True`, coupled with unsanitized user input. Immediate remediation is required to mitigate the risk.\n\n## Affected Version\n\nLlama Factory versions **<=0.9.0** are affected by this vulnerability.\n\n## Impact\n\nExploitation of this vulnerability allows attackers to:\n\n1. Execute arbitrary OS commands on the server.\n2. Potentially compromise sensitive data or escalate privileges.\n3. Deploy malware or create persistent backdoors in the system.\n\nThis significantly increases the risk of data breaches and operational disruption.\n\n## Root Cause\n\nThe vulnerability originates from the training process where the `output_dir` value, obtained from the user input, is injected into the popen function without any sanitization. Furthermore, popen is invoked in a unsafe way by enabling the interact shell (`shell=True`), leading to remote OS command injection vulnerability.\n\nVulnerable snippet: \n\n```python\n# https://github.com/hiyouga/LLaMA-Factory/blob/bd639a137e6f46e1a0005cc91572f5f1ec894f74/src/llamafactory/webui/runner.py#L304-L323\ndef _launch(self, data: Dict[\"Component\", Any], do_train: bool) -> Generator[Dict[\"Component\", Any], None, None]:\n\t\t\t\t...\n args = self._parse_train_args(data) if do_train else self._parse_eval_args(data)\n\t\t\t\t...\n self.trainer = Popen(f\"llamafactory-cli train {save_cmd(args)}\", env=env, shell=True)\n yield from self.monitor()\n```\n\n## Proof of Concept (PoC)\n\n### Steps to Reproduce\n\n- Deploy llama factory\n\n- Execute the exploitation script from: https://gist.github.com/superboy-zjc/f2d2b93ae511c445ba97e144b70e534d\n\n ```bash\n python3 llama-factory-rce.py --url http://127.0.0.1:7861 --cmd \"curl XXX\" --trace\n ```\n\n![llama-factory-rce](https://api.2h0ng.wiki:443/noteimages/2024/11/21/00-33-37-5347128a141f8765e7d218c89d94162a.gif)\n\nBad actors are able to execute any OS command as they want.\n\n## Remediation Recommendations\n\n**Avoid using `shell=True` in `Popen`.**\n\n- Instead, pass the command and its arguments as a list. This prevents user inputs from being executed as part of a shell command.\n\n```python\ncmd = [\n \"llamafactory-cli\",\n \"train\", \n \t*save_cmd(args).split(),\n]\nself.trainer = Popen(cmd, env=env)\n```\n\n", + "severity": [ + { + "type": "CVSS_V3", + "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N" + } + ], + "affected": [ + { + "package": { + "ecosystem": "PyPI", + "name": "llamafactory" + }, + "ranges": [ + { + "type": "ECOSYSTEM", + "events": [ + { + "introduced": "0" + }, + { + "fixed": "0.9.1" + } + ] + } + ], + "database_specific": { + "last_known_affected_version_range": "<= 0.9.0" + } + } + ], + "references": [ + { + "type": "WEB", + "url": "https://github.com/hiyouga/LLaMA-Factory/security/advisories/GHSA-hj3w-wrh4-44vp" + }, + { + "type": "WEB", + "url": "https://github.com/hiyouga/LLaMA-Factory/commit/b3aa80d54a67da45e9e237e349486fb9c162b2ac" + }, + { + "type": "PACKAGE", + "url": "https://github.com/hiyouga/LLaMA-Factory" + } + ], + "database_specific": { + "cwe_ids": [ + "CWE-78" + ], + "severity": "HIGH", + "github_reviewed": true, + "github_reviewed_at": "2024-11-21T22:20:45Z", + "nvd_published_at": null + } +} \ No newline at end of file diff --git a/advisories/github-reviewed/2024/11/GHSA-rmxg-6qqf-x8mr/GHSA-rmxg-6qqf-x8mr.json b/advisories/github-reviewed/2024/11/GHSA-rmxg-6qqf-x8mr/GHSA-rmxg-6qqf-x8mr.json new file mode 100644 index 00000000000..92021fb6cb4 --- /dev/null +++ b/advisories/github-reviewed/2024/11/GHSA-rmxg-6qqf-x8mr/GHSA-rmxg-6qqf-x8mr.json @@ -0,0 +1,69 @@ +{ + "schema_version": "1.4.0", + "id": "GHSA-rmxg-6qqf-x8mr", + "modified": "2024-11-21T22:22:03Z", + "published": "2024-11-21T22:22:03Z", + "aliases": [ + "CVE-2023-40017" + ], + "summary": "GeoNode Server Side Request forgery", + "details": "### Summary\nA server side request forgery vuln was found within geonode when testing on a bug bounty program. Server side request forgery allows a user to request information on the internal service/services.\n\n### Details\nThe endpoint /proxy/?url= does not properly protect against SSRF. when using the following format you can request internal hosts and display data. /proxy/?url=http://169.254.169.254\\@whitelistedIPhere. This will state wether the AWS internal IP is alive. If you get a 404, the host is alive. A non alive host will not display a response. To display metadata, use a hashfrag on the url /proxy/?url=http://169.254.169.254\\@#whitelisteddomain.com or try /proxy/?url=http://169.254.169.254\\@%23whitelisteddomain.com\n\n### Impact\nPort scan internal hosts, and request information from internal hosts.\n", + "severity": [ + { + "type": "CVSS_V3", + "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N" + } + ], + "affected": [ + { + "package": { + "ecosystem": "PyPI", + "name": "geonode" + }, + "ranges": [ + { + "type": "ECOSYSTEM", + "events": [ + { + "introduced": "3.2.0" + }, + { + "fixed": "4.2.0" + } + ] + } + ] + } + ], + "references": [ + { + "type": "WEB", + "url": "https://github.com/GeoNode/geonode/security/advisories/GHSA-rmxg-6qqf-x8mr" + }, + { + "type": "ADVISORY", + "url": "https://nvd.nist.gov/vuln/detail/CVE-2023-40017" + }, + { + "type": "WEB", + "url": "https://github.com/GeoNode/geonode/commit/a9eebae80cb362009660a1fd49e105e7cdb499b9" + }, + { + "type": "PACKAGE", + "url": "https://github.com/GeoNode/geonode" + }, + { + "type": "WEB", + "url": "https://github.com/pypa/advisory-database/tree/main/vulns/geonode/PYSEC-2023-269.yaml" + } + ], + "database_specific": { + "cwe_ids": [ + "CWE-918" + ], + "severity": "HIGH", + "github_reviewed": true, + "github_reviewed_at": "2024-11-21T22:22:03Z", + "nvd_published_at": "2023-08-24T23:15:09Z" + } +} \ No newline at end of file