Interestingly, in the US, slavery is explicitly permitted by the Constitution as a punishment for crimes. (Though whether prison labor should count as "slavery" or as a different form of "involuntary servitude" is an interesting semantic question.)
"Neither slavery nor involuntary servitude, except as a punishment for crime whereof the party shall have been duly convicted, shall exist within the United States, or any place subject to their jurisdiction."