You need to agree to share your contact information to access this dataset

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this dataset content.

YAML Metadata Warning: empty or missing yaml metadata in repo card (https://huggingface.co/docs/hub/datasets-cards)

PARSeqTokenizer Arbitrary File Read PoC

Vulnerability: PARSeqTokenizer.set_vocabulary() in keras-hub calls open(vocabulary, "r") on config-supplied string path without any safe_mode check or path validation.

Files

  • malicious_model.keras — Crafted .keras ZIP with PARSeqTokenizer config pointing vocabulary to /etc/passwd
  • poc.py — Full PoC script demonstrating the vulnerability

Reproduction

pip install keras keras-hub tensorflow
python poc.py

The PoC creates a malicious .keras file, loads it with keras.saving.load_model(safe_mode=True), and demonstrates that /etc/passwd contents are read and stored in the tokenizer's vocabulary attribute.

Impact

An attacker publishes a malicious .keras model to HuggingFace/Kaggle. A victim loads it. The attacker-controlled vocabulary path causes arbitrary file reads on the victim's system. File contents are exfiltrated via tokenizer.vocabulary / tokenizer.get_vocabulary().

Downloads last month
7