The penalties for a failed drug test while incarcerated can be some or all of the following: significant time in disciplinary segregation (the SHU, the "hole", etc)loss of visitation, loss of commissary, loss of telephone use, loss of good time credits and possibly transferred to a prison with higher security which makes doing time even harder than it needs to be.
https://www.inmateaid.com/ask-the-inmate/what-are-the-possible-penalties-for-an-inmate-failing-a-drug-test#answer
Accepted Answer Date Created: February 21,2016