Practice harm reduction and moderation and there's not too much danger.
Easier said than done in a lot of cases, especially with hard drugs.
Where I live, a lot of youth has become HIV +ve due to injecting drug use. Had the government provided safe needles, this could have never happened. The cops are very corrupt, and most of the cases they side with the drug dealers. When someone stands against them, they slap false charges and put him in jail.