the company that first found this vulnerability also has a tool for this https://www.npmjs.com/package/@aikidosec/safe-chain