Two causes, either excess lubrication getting past the piston seal, or a bad piston seal allowing lube to getting into the "compression" area, or perhaps BOTH. Any petroleum based lubes like molly paste and "tar" are based on "dinosaur oil" and will detonate when compressed, similar to the diesel engine.
To get away from dieseling in my piston guns I completely stripped them of "dieseling petroleum based lubes" and replaced the lubes with Dupont Krytox GPL205 which doesn't diesel (create smoke and/or bang). When a piston gun diesels the internal pressures spike stressing the internal components.
Decades ago when I started messing with "HW springer tunes" I had replaced the spring kit of my .20 R9 with a brand new Maccari spring. When reassembling the R9 I evidently got a wad of molly paste in front of the piston seal. The first shot over the chrony came with a LOUD BANG and the chrony registered 1100fps with a 11.5 grain Beeman FTS pellet (300fps above normal)! That single detonation broke the brand new high grade aftermarket spring when the piston rebounded from the detonation while the spring coils were surging forward. Even with a gas ram I can't imagine where piston rebound from dieseling would be good for the piston seal, breech seal, or the ram itself.
Anywhoo.......perhaps a tear down is needed to look at the piston seal and general lubing.