Downloads · 30 days
0
ericblackgachara/surrealml-panic-dos-poc
surrealml-panic-dos-poc is a machine learning model from ericblackgachara. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Downloads · 30 days
0
Access
Public
Updated May 30, 2026
Repo size
185 KB
Likes
0
Public
Click a slice to open those files.
.pdf185 KB · 96%
From the Hugging Face model README
| Field | Value |
|---|---|
| Repository | surrealdb/surrealml |
| Commit | 152ac2d508f1bae9ee62c46b7d211d80e40a6425 (latest) |
| CWE | CWE-248 (Uncaught Exception) / CWE-20 (Improper Input Validation) |
| CVSS 3.1 | 7.5 High — AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| Expected payout | $1,500 |
| Platform | huntr.com — Model File Formats board |
| Bug | File | Line | Trigger | Malicious field |
|---|---|---|---|---|
| A | input_dims.rs | 34 | parse::<i32>().unwrap() | input_dims = "abc" |
| B | origin.rs | 115 | split.next().unwrap() → None | origin = "noarrow" |
| C | output.rs | 73 | NormaliserType::from_string().unwrap() | output = "name=>badnorm(0,1)" |
All three: tiny crafted .surml file (50–66 bytes) → panic crosses FFI boundary → SIGABRT.
Each parser uses .unwrap() on user-controlled data with no error propagation. These panics are unrecoverable across the C FFI boundary used by the Python/database integration.
SurMlFile::from_file() → Header::from_bytes()
→ InputDims::from_string() input_dims.rs:34 → parse::<i32>().unwrap() [Bug A]
→ Origin::from_string() origin.rs:115 → split.next().unwrap() [Bug B]
→ Output::from_string() output.rs:73 → from_string().unwrap() [Bug C]
# Create all three malicious files (50-66 bytes each)
python3 poc_surrealml_panic.py
# Each crashes via:
SurMlFile.load("bug_a_input_dims.surml", Engine.PYTORCH) # ParseIntError
SurMlFile.load("bug_b_origin.surml", Engine.PYTORCH) # None unwrap
SurMlFile.load("bug_c_output.surml", Engine.PYTORCH) # Unknown normaliser
| File | Purpose |
|---|---|
poc_surrealml_panic.py | Python PoC — creates all 3 malicious files, explains each bug |
report.md | Full huntr-formatted report covering all 3 bugs |
poc-evidence.html | Self-contained HTML evidence page with terminal output for A, B, C |
README.md | This file |
Replace all three .unwrap() calls with ? or .ok_or_else() to propagate errors as SurrealError instead of panicking.
Eric Gachara · huntr.com · 2026-05-30