I get shocks "all the time". It's when humidity is low and I build up a static charge, which happens in the winter because outside air hasn't got much water in it, then it gets heated to room temperature and has very low humidity. There's no mystery here. I bought my first wireless router simply because I was
frying my wired routers; I'd systematically walk through all the ports, destroying them one by one, then I'd have to buy a new one. I realized it was cheaper to pay much more and go wireless than keep buying wired routers. I cringe when it happens now because I always know I'm frying
something, I just don't know what. Fortunately, I've got a house humidifier now, which mitigates the problem.
Alternatively, as others say, you've got a grounding problem. But that's a different sort of shock.