by high_byte on 11/26/24, 10:39 AM with 13 comments
I disable __builtins__ so no imports, exec, eval, open, etc. inside that context
but it seems you can still always do object.__subclasses__() and find every system method (eg. open())
it can't be overwritten but looking at the interpreter code is seems like it's possible to hack a workaround for this specific case.
are there other known ways to escape exec()?
by zahlman on 11/27/24, 1:06 AM
by Terr_ on 11/26/24, 11:07 AM
It's the curse of any sufficiently useful language. Well, maybe not Lua, but that was specifically designed for embedding. Java also began with that intention back when applets were ahead of their time, though IIRC secure sandboxing is no longer really a feature.
by eesmith on 11/26/24, 11:05 AM
by billpg on 11/26/24, 10:58 AM
by PixelNomad_123 on 11/26/24, 12:59 PM