Instructions to use missamehdi/model-keras-lambda-rce with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Keras
How to use missamehdi/model-keras-lambda-rce with Keras:
# !pip install -U keras tensorflow huggingface_hub # Keras needs TensorFlow installed to read "hf://" paths, so the tensorflow backend is selected here; # "jax" and "torch" also work for computation once TensorFlow is installed. import os os.environ["KERAS_BACKEND"] = "tensorflow" import keras model = keras.saving.load_model("hf://missamehdi/model-keras-lambda-rce") - Notebooks
- Google Colab
- Kaggle
|
Download README.md from missamehdi/model-keras-lambda-rce: direct link, hf CLI and curl.
- Browser
- Download file 408 Bytes
-
https://huggingface.co/missamehdi/model-keras-lambda-rce/resolve/main/README.md
- Command line
-
hf download hf://missamehdi/model-keras-lambda-rce/README.md
-
curl -L -o README.md https://huggingface.co/missamehdi/model-keras-lambda-rce/resolve/main/README.md
408 Bytes
| # PoC: Keras Lambda Layer ACE | |
| ## Vulnerability | |
| Arbitrary Code Execution via Keras Lambda Layer Deserialization | |
| ## Format | |
| Keras Native (.keras) | |
| ## Impact | |
| - Full system compromise when model loaded with safe_mode=False | |
| - Arbitrary code execution | |
| - Bounty: $3,000-$4,000 | |
| ## Test | |
| ```python | |
| keras.config.enable_unsafe_deserialization() | |
| model = keras.models.load_model('malicious_keras_ace.keras') # RCE! | |
| ``` | |