CVE-2008-4863
Untrusted search path in Blender 2.46 allows local users to execute arbitrary code via a malicious Python file in the current directory
- CVSS 6.9
- CWE-426: Untrusted Search Path
- Input Validation and Sanitization
- Local
Untrusted search path vulnerability in BPY_interface in Blender 2.46 allows local users to execute arbitrary code via a Trojan horse Python file in the current working directory, related to an erroneous setting of sys.path by the PySys_SetArgv function.
- CVSS base score
- 6.9
- Published
- 2008-11-01
- OWASP
- A05 Security Misconfiguration
- Orthogonal defect classification
- Function
- Code defect classification
- Incorrect Functionality
- Category
- Input Validation and Sanitization
- Subcategory
- Path Traversal
- Accessibility scope
- Local
- Impact
- Arbitrary Code Execution
- Affected component
- Python
- Fixed by upgrading
- Yes
Solution
Update Blender to version 2.47 or higher.
Vulnerable code sample
import sys
def vulnerable_import(module_name):
# Potentially unsafe: adds current working directory to sys.path
sys.path.append('') # This adds the current directory to the path
# Importing the module without validation
__import__(module_name)
# Example usage
vulnerable_import('malicious_module') # Could lead to executing a Trojan horsePatched code sample
import os
import sys
def secure_import(module_name):
# Store the original sys.path
original_sys_path = sys.path.copy()
# Clear sys.path to prevent untrusted directories
sys.path = []
try:
# Import the module safely
__import__(module_name)
finally:
# Restore the original sys.path
sys.path = original_sys_path
# Example usage
secure_import('trusted_module')Cite this entry
@misc{vaitp:cve20084863,
title = {{Untrusted search path in Blender 2.46 allows local users to execute arbitrary code via a malicious Python file in the current directory}},
author = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
year = {2008},
note = {VAITP Python Vulnerability Dataset, entry CVE-2008-4863},
howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2008-4863/}}
}
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 ::
