Lua 5.3.5 has a use-after-free in lua_upvaluejoin in lapi.c. For example, a crash outcome might be achieved by an attacker who is able to trigger a debug.upvaluejoin call in which the arguments have certain relationships.
https://lists.debian.org/debian-lts-announce/2023/06/msg00031.html
https://github.com/lua/lua/commit/89aee84cbc9224f638f3b7951b306d2ee8ecb71e