I used ABESCO fire stop expanding foam to seal the openings between the engine compartment and the rear quarter panels on my VW beetle. That was 15 years ago and there is no evidence of rust and it is an effective seal. This foam has very little water absorption and is typically used to seal around ducts and electrical conduits in fire rated walls and floors. I'm not sure I would use it to completely fill a cavity but it expands to fill a large opening similar to Great Stuff. It is not the same as Great Stuff. The two part foam would be better if you need to fill a sizable cavity but I don't know about it's flammability.

Mark