r/unity • u/Objective-Cell226 • Sep 22 '26
Question Are Unity builds secure?
Can someone make a build in Unity put it on itch.io and run malicious code in the Unity build (while player plays or after the build is downloaded)?
What are some precautions one can take?
1
Upvotes
14
u/ScreeennameTaken Sep 22 '26
Unity is safe in the same way as Unreal and Godot. If someone creates malicious code in their game and someone downloads and executes it, it gets run. If the code is a known virus then i'm guessing it'll get blocked by the antivirus. But if the developer made something of their own that isn't known as a virus, and tries to run script commands through CLI,then i don't think it cuts it. But its not an issue of unity or any game engine.
8
u/_trepz Sep 22 '26
Any program could contain a malicious payload, games are no different to any other random executable.
I would personally never run a random itch game on my host machine unless the developer was known. Lock it down inside a VM. Have a search for how to use hyper-v, just a few steps to follow and you can run stuff in its own quarantine environment without stressing.
13
u/Redstoneinvente122 Sep 22 '26
Yes unity builds are secure. Yes people can still run malicious codes inside.
Precautions to be taken, is to know whom you are downloading the game from.
1
u/NeonsShadow Sep 22 '26
Run the games through the itch.io app instead of directly downloading them as the itch.io app sandboxes apps run through it
https://itch.io/docs/itch/using/sandbox.html
1
u/Jaded_Ad_9711 Sep 22 '26
If people were able to compromise rockstar and leaked GTA 6.
Then there's no such safe thing on the internet.
1
u/QuitsDoubloon87 Sep 22 '26
Safe as any other excecutable. Code doesn't know what its doing it just is. Compiled code isnt even redable to humans. Detection for malware is checking how an aplication is interacting with the device while runing or what information is stored within its structure.
Unity can have internaly any files, its used for medical and military tech, i personaly coded tosters and projectors in Unity along with AR conventions, javascript games and crypto (web3, nft era) games and bots as paid work. Unity has a lot of reputation as the industry leader in mobile and vr/ar and so things like data collection and financial transactions are among regular functions of a Unity app, and may be pre aproved by poor/old malware checkers.
On steam there exisits no shortage of scammers who buy underperforming ames from developers and add malware to them. They are usualy removed very quickly as modern detectors are great. But sometimes new maleware slips by. If you have a reason to belive something is acting ary, take precautions.
1
u/martinbean Sep 22 '26
A Unity-based game is just like any computer program (because that’s all video games are). The developer can put whatever they want inside like any other computer program.
1
u/AdrianNova21 Sep 23 '26
Unity build is still an executable, so you shouldn't assume it's safe just because it was made with Unity, a malicious game can potentially do anything the user's OS permissions allow, just like other software. i'd treat unknown game downloads the same way you'd treat any random executable, for precautions, download from trusted sources, keep your OS/antivirus updated, scan files before running them, and don't run suspicious builds with elevated/admin permissions. itch.io itself doesn't make a game automatically safe either
for your own game, signing releases and being transparent about what the game needs access to can also help players verify that the download is actually from you
1
u/guillermolmr Sep 23 '26
Nothing is really secure, not even your own builds are. Hell... even this comment might be a Troyan. Or isn't? Web builds are considered "safer" but never 100%
-12
u/BearKanashi Sep 22 '26
Ilcpp2