VAITP Dataset

← Back to the dataset

CVE-2009-3850

Blender versions 2.34, 2.35a, 2.40, and 2.49b: Remote code execution via malicious Python in .blend files' onLoad action of ScriptLink SDNA

  • CVSS 9.3
  • CWE-94 Improper Control of Generation of Code ('Code Injection')
  • Input Validation and Sanitization
  • Remote

Blender 2.34, 2.35a, 2.40, and 2.49b allows remote attackers to execute arbitrary code via a .blend file that contains Python statements in the onLoad action of a ScriptLink SDNA.

CVSS base score
9.3
Published
2009-11-06
OWASP
A08 Software and Data Integrity Failures
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
Blender
Fixed by upgrading
Yes

Solution

Update Blender to version 2.50 or higher.

Vulnerable code sample

import bpy

# Example of a vulnerable script link that executes arbitrary code
def vulnerable_script_link():
    # This code could be modified by an attacker to execute arbitrary commands
    exec("print('Executing arbitrary code!')")

# Register the vulnerable script link
bpy.app.handlers.load_post.append(vulnerable_script_link)

Patched code sample

import bpy

# Example of a safe script link that does not allow arbitrary code execution
def safe_script_link():
    # Prevent execution of arbitrary code
    print("This script link is safe and does not execute arbitrary Python statements.")

# Register the safe script link
bpy.app.handlers.load_post.append(safe_script_link)

Cite this entry

@misc{vaitp:cve20093850,
  title        = {{Blender versions 2.34, 2.35a, 2.40, and 2.49b: Remote code execution via malicious Python in .blend files' onLoad action of ScriptLink SDNA}},
  author       = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
  year         = {2009},
  note         = {VAITP Python Vulnerability Dataset, entry CVE-2009-3850},
  howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2009-3850/}}
}

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.