Spray foam is the best and one of the only ways to properly insulate and seal rim joist cavities
More Pipes Going Through
Not only does air leak around all the plumbing and electrical penetrations, it also comes in and out through all the seams in the joists.
Spray Foam in Rim Joists
Cold winter air would have been blowing right in on that duct before we sealed these