VAITP Dataset

← Back to the dataset

CVE-2019-4000

Druva inSync Mac OS Client 6.5.0 allows local attackers to gain root privileges via arbitrary Python code execution

  • CVSS 7.8
  • CWE-94 Improper Control of Generation of Code ('Code Injection')
  • Authentication, Authorization, and Session Management
  • Local

Improper neutralization of directives in dynamically evaluated code in Druva inSync Mac OS Client 6.5.0 allows a local, authenticated attacker to execute arbitrary Python expressions with root privileges.

CVSS base score
7.8
Published
2020-02-25
OWASP
A03 Injection
Orthogonal defect classification
Function
Code defect classification
Incorrect Functionality
Category
Authentication, Authorization, and Session Management
Subcategory
Privilege Escalation
Accessibility scope
Local
Impact
Arbitrary Code Execution
Affected component
Python
Fixed by upgrading
Yes

Solution

Update Druva inSync Mac OS Client to version 6.5.1 or higher.

Vulnerable code sample

def execute_command(command):
    # Dynamically evaluate the command without validation
    return eval(command)

# Example usage
user_input = "os.system('ls')"  # Arbitrary command input
execute_command(user_input)

Patched code sample

import subprocess

def safe_execute(command):
    # Validate the command to ensure it is safe
    allowed_commands = {'ls', 'pwd', 'whoami'}
    if command in allowed_commands:
        return subprocess.run(command, shell=True, check=True)
    else:
        raise ValueError("Unauthorized command execution attempt.")

# Example usage
try:
    safe_execute('ls')  # Safe command
    safe_execute('rm -rf /')  # This will raise an error
except ValueError as e:
    print(e)

Cite this entry

@misc{vaitp:cve20194000,
  title        = {{Druva inSync Mac OS Client 6.5.0 allows local attackers to gain root privileges via arbitrary Python code execution}},
  author       = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
  year         = {2020},
  note         = {VAITP Python Vulnerability Dataset, entry CVE-2019-4000},
  howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2019-4000/}}
}

Download this entry as JSON Download the whole dataset

Introducing the "VAITP dataset": a specialized repository of Python vulnerabilities and patches, meticulously compiled for the use of the security research community. As Python's prominence grows, understanding and addressing potential security vulnerabilities become crucial. Crafted by and for the cybersecurity community, this dataset offers a valuable resource for researchers, analysts, and developers to analyze and mitigate the security risks associated with Python. Through the comprehensive exploration of vulnerabilities and corresponding patches, the VAITP dataset fosters a safer and more resilient Python ecosystem, encouraging collaborative advancements in programming security.

The supreme art of war is to subdue the enemy without fighting.

Sun Tzu – “The Art of War”

:: Shaping the future through research and ingenuity ::

Before you use the VAITP AI models

Please read and accept the following disclaimer:

By choosing "I understand and accept", you acknowledge that you understand and agree to these terms.