hacnho's picture
Upload README.md with huggingface_hub
de76781 verified
|
Raw
History Blame Contribute Delete
1.16 kB
---
tags:
- security
- proof-of-concept
- messagepack
license: mit
---
# MessagePack msgspec map32 int->nil materialization DoS PoC
This repository contains a benign security research PoC for a `.msgpack`
artifact that drives large map materialization during normal
`msgspec.msgpack.decode(...)` parsing.
Files:
- `control_bin32_same_size.msgpack`
- `malicious_map32_int_nil_2000000.msgpack`
- `reproduce.py`
Observed behavior:
- control artifact:
- parses successfully as `bytes`
- malicious artifact:
- same size as control
- parses successfully as a `dict`
- materializes `2,000,000` entries
- materially increases peak RSS during normal parse
Public files:
- `https://huggingface.co/hacnho/messagepack-msgspec-map32-int-nil-materialization-dos-poc/resolve/main/control_bin32_same_size.msgpack`
- `https://huggingface.co/hacnho/messagepack-msgspec-map32-int-nil-materialization-dos-poc/resolve/main/malicious_map32_int_nil_2000000.msgpack`
- `https://huggingface.co/hacnho/messagepack-msgspec-map32-int-nil-materialization-dos-poc/resolve/main/reproduce.py`
Reproduction:
```bash
python3 build_poc.py
python3 reproduce.py
```