Could be 100 things...I doubt it is over extension if it is happening in both shoulders..

Could be from something in the back (Spinal area disc etc) or a pinched nerve you will be surprised how something compressed or out of place could effect you...

Were you ever a weight lifter? If so how long ago and if you were a weight lifter did you do any type of cardio that you used your arms in a fashion in which you used full rotation? If the shoulder is not used to the movement it may just be a strain and fixed by taking time off and doing shadow boxing with light weights (first without weight then try 1 or 2lb) so the shoulder can adjust to the variation of movement.

Do you streatch before sparring or hitting the bag? Not shadow box but streatch...not to say you do not know what you are doing because I have never seen you workout but some people do not understand the difference...

Are you warmed up fully before boxing?...Does it only happen when you throw certain punches? EG when you miss a hook/uppercut?...Ever had shoulder problems like this before?

Something easy to help narrow it down...When this happens how do you help the pain?...If you use heat/be-gay etc and it helps more then likely it is muscle or nerve problem...If they do not help there is a chance it has to do with the bones or shoulder sockets themselves...

Go to your doctor and explain the problem and if it is real sever request a ct or MRI so it does not spill over into everyday movement...