VAITP Dataset

← Back to the dataset

CVE-2017-10803

Insecure data handling in Odoo 8.0, 9.0, and 10.0 allows authenticated users to execute arbitrary Python code through unpickling in the Database Anonymization module

  • CVSS 6.5
  • CWE-502 Deserialization of Untrusted Data
  • Input Validation and Sanitization
  • Remote

In Odoo 8.0, Odoo Community Edition 9.0 and 10.0, and Odoo Enterprise Edition 9.0 and 10.0, insecure handling of anonymization data in the Database Anonymization module allows remote authenticated privileged users to execute arbitrary Python code, because unpickle is used.

CVSS base score
6.5
Published
2017-07-04
OWASP
A08 Software and Data Integrity Failures
Orthogonal defect classification
Timing/Serialization
Code defect classification
Serialization Issues
Category
Input Validation and Sanitization
Subcategory
Insecure Parsing or Deserialization
Accessibility scope
Remote
Impact
Arbitrary Code Execution
Affected component
Odoo
Fixed by upgrading
Yes

Solution

Update Odoo to a version that addresses the vulnerability.

Vulnerable code sample

import pickle

# Vulnerable code example using unpickle
def load_data(data):
    # This method uses pickle.loads, which can execute arbitrary code
    return pickle.loads(data)

# Example of potentially malicious serialized data
malicious_data = pickle.dumps({'__class__': 'os.system', '__args__': ('echo Vulnerable!',)})

# Load the data (this would execute the command if the data is malicious)
result = load_data(malicious_data)

Patched code sample

import pickle

# Vulnerable code example using unpickle
def vulnerable_load_data(data):
    return pickle.loads(data)

# Fixed code example that avoids using unpickle
def safe_load_data(data):
    # Instead of unpickling, use a safer method to deserialize data
    # Here we assume data is a dictionary and we validate it
    if isinstance(data, dict):
        # Perform further validation on the dictionary if needed
        return data
    else:
        raise ValueError("Invalid data format")

Cite this entry

@misc{vaitp:cve201710803,
  title        = {{Insecure data handling in Odoo 8.0, 9.0, and 10.0 allows authenticated users to execute arbitrary Python code through unpickling in the Database Anonymization module}},
  author       = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
  year         = {2017},
  note         = {VAITP Python Vulnerability Dataset, entry CVE-2017-10803},
  howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2017-10803/}}
}

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.