Downloads · 30 days
0
hoanghai2110/surrealml-dos-poc
surrealml-dos-poc is a machine learning model from hoanghai2110. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
Vulnerability: Unbounded heap allocation in SurMlFile::fromfile() Severity: Medium (DoS via malformed model file) Affected: SurrealML all versions as of June 2026
Downloads · 30 days
0
Access
Public
Updated Jul 1, 2026
Repo size
—
Likes
0
Public
Click a slice to open those files.
Other1.5 KB · 46%
From the Hugging Face model README
.surml Denial of Service PoCVulnerability: Unbounded heap allocation in SurMlFile::from_file()
Severity: Medium (DoS via malformed model file)
Affected: SurrealML all versions as of June 2026
| File | Size | header_len claimed | Effect |
|---|---|---|---|
dos_4gb.surml | 8 bytes | 0xFFFFFFFF (~4 GiB) | OOM crash |
dos_256mb.surml | 8 bytes | 256 MiB | 256 MiB alloc |
modules/core/src/storage/surml_file.rs in from_file():
let integer_value = u32::from_be_bytes(buffer); // attacker-controlled
// NO size guard:
let mut header_buffer = vec![0u8; integer_value as usize]; // up to 4 GiB
An 8-byte .surml file forces a 4 GiB heap allocation.
pip install surrealml
python3 reproduce.py
const MAX_HEADER_SIZE: usize = 64 * 1024 * 1024;
if integer_value as usize > MAX_HEADER_SIZE {
return Err(SurrealError::new("header too large".into(), ...));
}