Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

There's a problem---you can break out of Lua with malformed bytecode [1] and the Lua team don't want to spend the time trying to validate Lua byte code [2]. That's why the latest Lua version has an option to ignore precompiled Lua scripts.

And sadly, I can see the same happening here.

[1] https://www.corsix.org/content/malicious-luajit-bytecode

[2] The overhead will eat any performance gained by using precompiled Lua code in the first place.



Sure, if you're loading scripts from an untrusted source then don't use bytecode. They're pretty clear about that in the docs. However probably about 90% of Lua's use cases are embedded and so in that case it works just fine.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: