Stabbing is a non-elemental hazard in the Pikmin series. Most Pikmin have soft bodies, making them vulnerable to the dangers of being stabbed, and afterwards, most likely killed. Rock Pikmin can withstand stab attacks, since their rocky bodies simply bounce away after an attempted stabbing.
Stabbing in and of itself is not lethal most of the time, and is not possible against Rock Pikmin, but a Pikmin that gets stabbed is usually going to get eaten afterwards. If the enemy that did the stabbing gets killed before the Pikmin is eaten, the Pikmin will be safely dropped on the floor with no lasting effects. Only a few enemies are capable of stabbing Pikmin, and although things like a predator's jaws practically stab their prey when chomped, that is not distinguished as a stabbing attack in the series, and Rock Pikmin are not immune to being eaten. In Hey! Pikmin, stabbing attacks have simpler mechanics, and stabbed Pikmin simply die on the spot right away instead, after a short animation.
Leaders take damage from stabbing attacks like any standard attack.
Ways to get stabbed
In the same vein as the Joustmites, it is assumed that Cloaking Burrow-nits in Pikmin 2 also have an attack that counts as a "stabbing" hazard, although this is not distinctly recognized as being a hazard in that game by any game mechanic or explanation.
The rough exterior of Rock Pikmin gives them the ability to survive being stabbed. Despite their bodies not getting pierced through, they are still knocked away, which can be an annoyance, or in extreme cases, lead to the Pikmin falling into a pit.