A sandbox escape in RestrictedPython allows authenticated users with the System Manager role to execute arbitrary code through frame introspection. An attacker can create a server script using the '/app/server-script' endpoint and access the `gi frame` attribute to traverse the call stack and invoke `os.popen()` to execute system commands.