The rules of cricket
Law 39 (Stumped)
1. Out Stumped
(a) The striker is out Stumped if
(i) he is out of his ground
and (ii) he is receiving a ball which is not a No ball
and (iii) he is not attempting a run
and (iv) his wicket is fairly put down by the wicket-keeper without the intervention of another member of the fielding side. Note Law 40.3 (Position of wicket-keeper).
(b) The striker is out Stumped if all the conditions of (a) above are satisfied, even though a decision of Run out would be justified.
2. Ball rebounding from wicket-keeper's person
(a) If the wicket is put down by the ball, it shall be regarded as having been put down by the wicket-keeper if the ball
(i) rebounds on to the stumps from any part of his person or equipment, other than a protective helmet
or (ii) has been kicked or thrown on to the stumps by the wicket-keeper.
(b) If the ball touches a helmet worn by the wicket-keeper, the ball is still in play but the striker shall not be out Stumped. He will, however, be liable to be Run out in these circumstances if there is subsequent contact between the ball and any member of the fielding side. Note, however, 3 below.
3. Not out Stumped
(a) If the striker is not out Stumped, he is liable to be out Run out if the conditions of Law 38 (Run out) apply, except as set out in (b) below.
(b) The striker shall not be out Run out if he is out of his ground, not attempting a run, and his wicket is fairly put down by the wicket-keeper without the intervention of another member of the fielding side, if No ball has been called.