Is solder mask expansion overlap legal?
It's fine, and when the pads are closer together than the manufacturing process can handle (the sliver between pads disappears or becomes too narrow to meet capabilities) there is no other way. Especially for 0.4mm pitch and similar really fine pitches.  

It probably makes shorts between pins a bit more likely, so check capabilities of your board houses and see if it is feasible to edit the footprint.