When you use earbuds in areas where the air is very dry, they can build up static electricity. Your ears might receive a small electrostatic discharge from the earbuds. If you receive a static shock from your earbuds, this doesn't mean that there's an issue with your device or the earbuds.

This condition is similar to dragging your feet across a carpet and receiving a static shock when you touch a doorknob. However, instead of the static charge building up on your body, the charge builds up on the device that the earbuds are connected to. Instead of the static buildup discharging through your finger when you touch a doorknob, it discharges through the earbuds.

This condition isn't limited to Apple hardware. Static can potentially build up on almost any hardware and could be discharged through any brand of earbuds.