YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
SurrealML β Multiple Panic-on-Parse DoS (3 Bugs)
Target
| 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 |
Three Confirmed Panic Paths
| 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.
Root Cause
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]
Reproduction
# 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
Deliverables
| 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 |
Suggested Fix
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
Inference Providers NEW
This model isn't deployed by any Inference Provider. π Ask for provider support