Modelscan Bypass PoC: smtplib.SMTP SSRF
Security Research — Responsible Disclosure
This model file demonstrates a modelscan bypass using smtplib.SMTP.
The SMTP constructor connects to the specified host immediately on construction,
enabling Server-Side Request Forgery (SSRF) attacks.
Vulnerability
- Module:
smtplib.SMTP(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
smtplib.SMTP(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