r/lua • • Sep 29 '26

News luarocks.org remote code execution exploit

18 Upvotes

27 comments sorted by

View all comments

Show parent comment

1

u/didntplaymysummercar Oct 26 '26

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 Oct 26 '26

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 Oct 26 '26

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.