CVE-2022-2054: Command Injection in Nuitka

nuitka Updated 02 Oct 2025

Summary

13/06/2022
Yes i
High
7.8

CVE-2022-2054: Command Injection in Nuitka. Affects nuitka versions < 0.9. Fixed in 0.9. How to fix ↓

Also tracked for

The same CVE-2022-2054 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

Nuitka is a Python compiler that translates Python code into optimized C code. It is commonly used to improve the performance and distribution of Python applications. However, versions 0.8.4 and prior of Nuitka are vulnerable to command injection, which can allow an attacker to execute arbitrary commands on the host system. This vulnerability poses a high risk to the security and integrity of affected systems.

Vulnerability Detail

The command injection vulnerability in Nuitka arises from improper handling of user-supplied input. An attacker can exploit this vulnerability by injecting malicious commands into certain functions within the Nuitka codebase. If successfully exploited, the attacker can execute arbitrary commands with the privileges of the user running the Nuitka application. This can lead to unauthorized access, data leakage, and potential system compromise.

How To Fix

Minimum fixed version

0.9

This is the first release that contains the fix.

pip install --upgrade "nuitka==0.9"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, users can implement input validation and sanitization measures to prevent command injection. It is crucial to carefully validate and sanitize any user-supplied input before using it in command execution functions. By enforcing strict input validation, the risk of command injection can be significantly reduced. Here is an example of input validation in Python:

import subprocess

user_input = input('Enter a command: ')

# Validate and sanitize user input
if not user_input.isalnum():
    print('Invalid input')
    exit()

# Execute the command
subprocess.call(user_input, shell=True)

This code snippet demonstrates how to validate and sanitize user input before executing a command using the subprocess module in Python. By ensuring that the input consists only of alphanumeric characters, the risk of command injection can be mitigated.

Conclusion

The command injection vulnerability in Nuitka poses a significant risk to the security and integrity of affected systems. It is crucial to update to version 0.9 or later, which includes a patch for this vulnerability. Additionally, implementing input validation and sanitization measures can provide temporary mitigation until the update is applied. For further support and assistance in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for nuitka →

Share this vulnerability

FAQ

Nuitka is a Python compiler that translates Python code into optimized C code. It is designed to improve the performance and distribution of Python applications.

Command injection is a security vulnerability that allows an attacker to execute arbitrary commands on a target system. It occurs when user-supplied input is not properly validated or sanitized before being used in command execution functions.

The command injection vulnerability in Nuitka can lead to unauthorized command execution with the privileges of the user running the Nuitka application. This can result in unauthorized access, data leakage, and potential system compromise.

Yes, a fix is available for the command injection vulnerability in Nuitka. Users are advised to update to version 0.9 or later, which includes a patch that addresses the vulnerability.

As a temporary workaround, users can implement input validation and sanitization measures to prevent command injection. By carefully validating and sanitizing user-supplied input before using it in command execution functions, the risk of command injection can be reduced.

Related vulnerabilities

Recent vulnerabilities recorded for nuitka.

How To Fix

Minimum fixed version

0.9

This is the first release that contains the fix.

pip install --upgrade "nuitka==0.9"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback