**Title:**Blender .blend Project Arbitrary Command Execution
**Advisory Id:**CORE-2009-0912
**Advisory URL:**http://www.coresecurity.com/content/blender-scripting-injection
**Date published:**2009-11-05
**Date of last update:**2009-11-04
**Vendors contacted:**Blender Foundation
**Release mode:**User release
**Class:**Failure to Sanitize Data into a Different Plane [CWE-74]
**Impact:**Code execution
**Remotely Exploitable:**Yes (client side)
**Locally Exploitable:**No
Bugtraq ID:36838
CVE Name:CVE-2009-3850
Blender [2] is a 3D graphics application released as free software. It can be used for modeling, texturing, rendering, particle, and other simulations and creating interactive 3D applications, including games.
Blender embeds a python interpreter to extend its functionality. Blender .blend project files can be modified to execute arbitrary commands without user intervention by design. An attacker can take full control of the machine where Blender is installed by sending a specially crafted .blend file and enticing the user to open it.
The vendor did not provide fixes or workaround information.
To determine if a .blend file is suspicious you could parse the content of the file [3] searching for a SDNA [4] of type ScriptLink [5] with python code bound to an “onLoad” action.
This vulnerability was discovered and researched by Diego Juarez and Sebastián Tello from Core Security Technologies during Bugweek 2009 [1].
The publication of this advisory was coordinated by Fernando Russ from Core Security Advisories Team.
Blender [2] .blend project files can be modified to execute arbitrary commands without user intervention by design. An attacker can take full control of the machine where Blender is installed sending a specially crafted .blend file and enticing the user to open it.
These are the steps to reproduce the issue:
Open the “Text Editor” Panel.
Right click on the canvas and select “New”.
Write your python code there. For instance:
import os os.system("calc.exe")
In the text name field (TX:Text.001) input a name for your script, e.g.: TX:myscript.
Open the “Buttons Window” panel.
From the “panel” dropdown choose “Script”.
Check that “enable script links” is active.
Click on “new”.
Select the script you created (e.g. myscript).
Choose “OnLoad” from the event dropdown list.
In the “User Preferences” panel, select File->Save, and save your project.
[1] The author participated in Core Bugweek 2009 as member of the team “Gimbal Lock N Load”.
[2] <http://www.blender.org/>
[3] <http://www.atmind.nl/blender/mystery_ot_blend.html>
CoreLabs, the research center of Core Security Technologies, is charged with anticipating the future needs and requirements for information security technologies. We conduct our research in several important areas of computer security including system vulnerabilities, cyber attack planning and simulation, source code auditing, and cryptography. Our results include problem formalization, identification of vulnerabilities, novel solutions and prototypes for new technologies. CoreLabs regularly publishes security advisories, technical papers, project information and shared software tools for public use at: http://www.coresecurity.com/corelabs.
Core Security Technologies develops strategic solutions that help security-conscious organizations worldwide develop and maintain a proactive process for securing their networks. The company’s flagship product, CORE IMPACT, is the most comprehensive product for performing enterprise security assurance testing. CORE IMPACT evaluates network, endpoint and end-user vulnerabilities and identifies what resources are exposed. It enables organizations to determine if current security investments are detecting and preventing attacks. Core Security Technologies augments its leading technology solution with world-class security consulting services, including penetration testing and software security auditing. Based in Boston, MA and Buenos Aires, Argentina, Core Security Technologies can be reached at 617-399-6980 or on the Web at http://www.coresecurity.com.
The contents of this advisory are copyright © 2009 Core Security Technologies and © 2009 CoreLabs, and may be distributed freely provided that no fee is charged for this distribution and proper credit is given.
This advisory has been signed with the GPG key of Core Security Technologies advisories team.