Insurance is not the magic cure-all. For big enough corporations, there is no insurance. It's self-insurance. Costco may be big enough that they can't even get that type of insurance. Even if there was insurance, that doesn't solve the underlying problem. Liability is liability, whether hedge against or not.
The real thing here is that Costco should not be selling a defect product, or even giving it away. There is no way to totally waive liability - and there probably shouldn't be - for selling something defective. If the containers are leaking they are simply put, unfit for human consumption at any price or for any population. There is some food that is expired but not spoiled, and this is perfectly ethical to sell in a transparent way or to give away. But once it's a defective product - leaking peanut oil - it's simply not ethical to allow it to be consumed by humans. For one thing, it's going to be nasty. It's mixture is affected.