Doubt it was a malfunction. Most likely cause is a high primer. If the primer doesn't seat far enough into the primer pocket, it can stick out above the rim. The bolt face can smack the primer hard enough to set it off before the round has a chance to chamber.
In theory, I suppose a dirty gun maybe could be more likely to Kaboom. If the chamber is dirty, it could create more friction on the round and cause the bolt face to smack the round harder.
I had an 1187 do this to me once. It was about dusk after a long day of shooting skeet. Lucky for me it was a target load with 8-1/2 shot. All the lead went down the pipe, but the brass and plastic came out the ejection port. Since I am a lefty, the blast caught me in the side of the face and detached the retina in my left eye. Lost 60% of the vision in that eye. I can't bring myself to shoot a shotgun with a right-hand ejection port to this day.
I also religiously check my ammo everytime I buy a box. It doesn't go on the shelf until I have check every round.