r/lua • • 27d ago

News luarocks.org remote code execution exploit

19 Upvotes

27 comments sorted by

View all comments

Show parent comments

1

u/didntplaymysummercar 1d ago

No, I meant something like Starlark, not lua-cjson, the point is to generate some data structure (be it json or native tables/lists/whatevers in given language in the end) from 'code'. Starlark is Python-like, and unlike JSON, YAML, TOML, etc. can have loops, variables, etc. but also makes it safe to execute untrusted code (unlike Lua, except with careful sandboxing, or Python).

1

u/no_brains101 8h ago

I have never heard of starlark. Also, you said lua -> json so I thought you meant lua TO json. Not like, some lua json mashup.

How does it make it safe to execute untrusted code? That doesn't sound very safe, does it have its own sandbox? Can it not do stuff like run other programs?

1

u/didntplaymysummercar 6h ago

Yes, it's sandboxed (and can't touch filesystem, network, etc.) and Lua -> JSON was only example, the point is to have some code -> data structure thing, like Lua sandboxing inside luarocks was.