VAITP Dataset

← Back to the dataset

CVE-2015-4234

Cisco NX-OS local root access via Python interpreter (CVEs: CSCun02887, CSCur00115, CSCur00127)

  • CVSS 7.2
  • CWE-264
  • Authentication, Authorization, and Session Management
  • Local

Cisco NX-OS 6.0(2) and 6.2(2) on Nexus devices has an improper OS configuration, which allows local users to obtain root access via unspecified input to the Python interpreter, aka Bug IDs CSCun02887, CSCur00115, and CSCur00127.

CVSS base score
7.2
Published
2015-07-03
OWASP
A05 Security Misconfiguration
Orthogonal defect classification
Function
Code defect classification
Incorrect Functionality
Category
Authentication, Authorization, and Session Management
Subcategory
Privilege Escalation
Accessibility scope
Local
Impact
Privilege Escalation
Affected component
Python
Fixed by upgrading
Yes

Solution

Update to Cisco NX-OS 6.0(2a) or 6.2(2a) or higher.

Vulnerable code sample

# Vulnerable code that allows arbitrary command execution
import os

def execute_command(command):
    # Directly executing user input without validation
    os.system(command)

# Example usage
user_input = input("Enter a command to execute: ")
execute_command(user_input)  # This can be exploited to run arbitrary commands

Patched code sample

import os
import subprocess

# Function to execute a command securely
def secure_execute(command):
    # Ensure the command is from a predefined list of safe commands
    safe_commands = ['ls', 'whoami', 'pwd']  # Example safe commands
    if command in safe_commands:
        result = subprocess.run(command, shell=True, check=True, text=True, capture_output=True)
        return result.stdout
    else:
        raise ValueError("Unauthorized command execution attempt.")

# Example usage
try:
    output = secure_execute('ls')  # This is a safe command
    print(output)
except ValueError as e:
    print(e)

Cite this entry

@misc{vaitp:cve20154234,
  title        = {{Cisco NX-OS local root access via Python interpreter (CVEs: CSCun02887, CSCur00115, CSCur00127)}},
  author       = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
  year         = {2015},
  note         = {VAITP Python Vulnerability Dataset, entry CVE-2015-4234},
  howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2015-4234/}}
}

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.