Does 3ds Max offer a native sandbox for executing untrusted MAXScripts?
0 reputation · 19 Jan 2022, 02:55 UTC
0 reputation · 19 Jan 2022, 02:55 UTC
3ds Max versions from 2020 through 2025 execute MAXScript and Python code with the full privileges of the logged-in Windows user. This environment allows scripts to perform file system operations, launch shell processes via dosCommand, and interface with the .NET framework without any internal restriction layer.
While the documentation explicitly recommends running only trusted code, the application lacks a built-in sandbox, 'restricted mode,' or capability tokens to limit what a .ms or .mcr file can do. Furthermore, scene files can contain scripted controllers or callbacks that execute automatically upon loading, posing a risk when artists open assets from public forums or shared drives.
Is there any undocumented configuration within 3ds Max to restrict MAXScript's access to the filesystem or network? How can the application prevent the execution of malicious callbacks embedded in scene files without external OS security policies?
34775 reputation · 19 Jan 2022, 12:34 UTC
3ds Max does not provide a native sandbox or restricted‑mode for executing MAXScript or Python. All scripts run with the full privileges of the Windows account that launched Max, meaning they can read/write any file the user can access, launch external processes, and call .NET APIs without internal restriction.
.max file.-- Test script – write to a protected folder
local filePath = "C:\\Windows\\Temp\\maxscript_test.txt"
try(
local f = createFile filePath
format "Script ran successfully. File created at: %\n" filePath
close f
print "File written"
catch(error)
print ("Error: " + error)
runScript.
C:\Windows\Temp, the script had full filesystem access.dosCommand usage or limit the ability to launch arbitrary processes.python executable is the one bundled with Max and that no untrusted Python modules can be imported.Do you currently use any third‑party plug‑in that adds sandboxing or script‑execution limits? If so, the recommendation above may change, because such plug‑ins can provide an additional layer of protection that is not part of the core application.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.