Webp is one in a series of exploits that will come to pass in all codecs. Media codecs are made without regard to safety and overwhelmingly rely on handmade assembly or hardware implementations.
As usual most of this issue is resolved by using languages that can be memory safe.
As usual most of this issue is resolved by using languages that can be memory safe.