Instructions to use wulonchia/modelscan-nested-lambda-bypass with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Keras
How to use wulonchia/modelscan-nested-lambda-bypass 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://wulonchia/modelscan-nested-lambda-bypass") - Notebooks
- Google Colab
- Kaggle
ModelScan Nested Keras Lambda Layer Detection Bypass β PoC
This repository contains a proof-of-concept .keras model file for a detection
bypass in protectai/modelscan (v0.8.6).
File
nested_lambda_poc.kerasβ a Keras model whose maliciousLambdalayer is nested inside an innerSequentialsub-model.
Behavior
- ModelScan 0.8.6 only inspects the top-level
config.layerslist, so it reports "No issues found" for this file. - An identical Lambda at the top level is correctly flagged as MEDIUM severity.
- The nested Lambda still executes arbitrary code at
keras.models.load_model()time.
This PoC is shared privately (gated, manual review) for vulnerability disclosure purposes only.
- Downloads last month
- -
Inference Providers NEW
This model isn't deployed by any Inference Provider. π Ask for provider support