Modelscan Bypass PoC: ftplib.FTP SSRF
Security Research — Responsible Disclosure
This model file demonstrates a modelscan bypass using ftplib.FTP.
The FTP constructor connects to the specified host immediately on construction,
enabling Server-Side Request Forgery (SSRF) attacks.
Vulnerability
- Module:
ftplib.FTP(Python stdlib) - Type: SSRF (CWE-918)
- Impact: Network access to attacker-controlled server on model load
- Modelscan result: "No issues found" on both .pkl and pytorch_model.bin
How it works
ftplib.FTP(host) connects to the host immediately when the constructor is called.
This module is NOT in modelscan's unsafe_globals blocklist, so the pickle passes scanning
but executes a network connection when loaded with pickle.load() or torch.load().
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support