Instructions to use manja316/modelscan-nested-lambda-rce with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Keras
How to use manja316/modelscan-nested-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://manja316/modelscan-nested-lambda-rce") - Notebooks
- Google Colab
- Kaggle
|
Download README.md from manja316/modelscan-nested-lambda-rce: direct link, hf CLI and curl.
- Browser
- Download file 839 Bytes
-
https://huggingface.co/manja316/modelscan-nested-lambda-rce/resolve/main/README.md
- Command line
-
hf download hf://manja316/modelscan-nested-lambda-rce/README.md
-
curl -L -H "Authorization: Bearer $HF_TOKEN" -o README.md https://huggingface.co/manja316/modelscan-nested-lambda-rce/resolve/main/README.md
839 Bytes
metadata
license: mit
tags:
- security-research
- modelscan-bypass
- keras
Security Research — Keras Nested Lambda Scanner Bypass
This model is for authorized security research only.
This repository demonstrates a vulnerability in ProtectAI's modelscan scanner (v0.8.8) where Lambda layers nested inside Functional or Sequential submodels evade detection.
Vulnerability
modelscan checks top-level config.layers for class_name == "Lambda" but does not recurse into nested submodel configurations. A malicious Lambda layer inside a nested Functional model passes scanning with "No issues found" but executes arbitrary code on keras.models.load_model().
Affected
- modelscan <= 0.8.8
- Both .keras and .h5 format
- Both Functional and Sequential nesting
Disclosure
Responsible disclosure via Huntr MFV program.