VAITP Dataset

← Back to the dataset

CVE-2013-4245

Orca Python module loading allows arbitrary code execution

  • CVSS 7.3
  • CWE-20 Improper Input Validation
  • Input Validation and Sanitization
  • Remote

Orca has arbitrary code execution due to insecure Python module load

CVSS base score
7.3
Published
2019-12-11
OWASP
A06 Vulnerable and Outdated Components
Orthogonal defect classification
Function
Code defect classification
Incorrect Functionality
Category
Input Validation and Sanitization
Subcategory
Insecure Parsing or Deserialization
Accessibility scope
Remote
Impact
Arbitrary Code Execution
Affected component
Python
Fixed by upgrading
Yes

Solution

Update Orca to the latest version.

Vulnerable code sample

import importlib

def insecure_import(module_name):
    # Arbitrarily import any module without restriction
    return importlib.import_module(module_name)

# Example usage
module = insecure_import('os')  # This could allow arbitrary code execution

Patched code sample

import importlib
import os

def secure_import(module_name):
    allowed_modules = ['safe_module1', 'safe_module2']  # Define allowed modules
    if module_name in allowed_modules:
        return importlib.import_module(module_name)
    else:
        raise ImportError(f"Module '{module_name}' is not allowed.")

# Example usage
try:
    module = secure_import('unsafe_module')  # This will raise an ImportError
except ImportError as e:
    print(e)

Cite this entry

@misc{vaitp:cve20134245,
  title        = {{Orca Python module loading allows arbitrary code execution}},
  author       = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
  year         = {2019},
  note         = {VAITP Python Vulnerability Dataset, entry CVE-2013-4245},
  howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2013-4245/}}
}

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.