Whenever summary proceedings are given against a sheriff, his sureties, jointly and severally, shall be liable to the same, and may or may not be joined with him, and such recovery may be had against them as is given against the sheriff; provided, that upon such recovery against the sureties of any sheriff, in a summary mode of proceeding, the extent of said recovery shall not exceed the amount of money withheld by the sheriff, and ten percent per annum on the same from and after the return day of the execution.