YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
pocs/keras-core/ β Running PoC Results
Project: keras-core 0.1.7 (keras-team/keras-core) Author: Cooperate with Dingyu Wang and Jianhe Li Date: 2026-06-22 Backend: TensorFlow 2.15.0 (CPU)
Findings Status
| # | Name | API | Status |
|---|---|---|---|
| 1 | KERASCORE-RCE-01 | Legacy H5 load_model() Lambda bytecode revival |
β CONFIRMED |
| 2 | KERASCORE-RCE-02 | Legacy H5 compile restoration (second deserialization surface) | β CONFIRMED |
| 3 | KERASCORE-RW-03 | get_file() zip extraction lacks safety filter |
β CONFIRMED |
| 4 | KERASCORE-RCE-04 | model_from_json() Lambda bytecode revival |
β NOT CONFIRMED |
| 5 | KERASCORE-RCE-05 | model_from_config() Lambda bytecode revival |
β CONFIRMED |
Verified Environment
- Python 3.11.8
- keras-core 0.1.7 (editable install from source)
- TensorFlow 2.15.0
- h5py 3.16.0
- Windows 11 (nt path handling)
Key Finding: RCE-04 Rejected
model_from_json() in keras-core 0.1.7 uses serialization_lib.deserialize_keras_object(),
which sets SafeModeScope(True). When Lambda.from_config() is reached through this
path, safe_mode is correctly enforced and blocks __lambda__ deserialization.
The report's claim is not validated for this codebase version.
Key Finding: Legacy Path Bypass
The confirmed RCE-01 and RCE-05 findings share a common root cause:
- Legacy
serialization.deserialize_keras_object()(inlegacy/saving/serialization.py) does not set upSafeModeScope Lambda.from_config()callsserialization_lib.in_safe_mode()which returnsNone(never initialized by the legacy path)Noneis falsy, so thesafe_modeguard is bypassedmarshal.loads()is reached viapython_utils.func_load()
PoC Files
All PoC files output to C:\Users\user\AppData\Local\Temp/kerascore_rce*_marker.txt.
Marker contents confirm code execution at the marshal.loads() sink.