High density is relative. It depends on the chemical make up of the foam whether the solvents in spray paints will affect it. If it's make from styrene chances are it's get eaten.
Given that the mask is designed for paintball....I'd think you'll be okay.