Protocol Buffers CodeGeneratorRequest proto_file materialization DoS PoC
This repository contains a benign security research PoC for a .pb artifact
that drives repeated-message materialization during
plugin_pb2.CodeGeneratorRequest.ParseFromString(...).
Files:
control_one_proto_file.pbmalicious_proto_file_5000000.pbreproduce.py
Observed behavior:
- control artifact:
- parses successfully with one
proto_fileentry
- parses successfully with one
- malicious artifact:
- parses successfully with
5,000,000proto_fileentries - 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-codegeneratorrequest-proto-file-dos-poc/resolve/main/control_one_proto_file.pb
curl -L -O https://huggingface.co/hacnho/protobuf-codegeneratorrequest-proto-file-dos-poc/resolve/main/malicious_proto_file_5000000.pb
curl -L -O https://huggingface.co/hacnho/protobuf-codegeneratorrequest-proto-file-dos-poc/resolve/main/reproduce.py
python3 reproduce.py --control control_one_proto_file.pb --malicious malicious_proto_file_5000000.pb
Public files:
https://huggingface.co/hacnho/protobuf-codegeneratorrequest-proto-file-dos-poc/resolve/main/control_one_proto_file.pbhttps://huggingface.co/hacnho/protobuf-codegeneratorrequest-proto-file-dos-poc/resolve/main/malicious_proto_file_5000000.pbhttps://huggingface.co/hacnho/protobuf-codegeneratorrequest-proto-file-dos-poc/resolve/main/reproduce.py
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support