Skip to content
Back to ml-scanner report
SecurityHigh

Unsafe Model Deserialization

models/loader.py:24

What's going on

Trusted pickle.load is used on models downloaded from a URL that can be influenced by an advisory banner, enabling code execution if the source is ever tampered with.

Why it matters

Untrusted deserialization is effectively remote code execution on the model host.

models/loader.py:24

Recommended Fix

Replace the inline query with a parameterized statement and validate the id before it ever reaches the database. A regression test is generated alongside the patch.

Before
1 
After
1 
  1. Uploaddone
  2. Analyzedone
  3. Finddone
  4. Explainactive
  5. Fixupcoming
  6. Testupcoming
  7. Verifyupcoming