Do you mean you want to change the custody order? Your rights are going to depend on the orders in place. If there are no orders, you should file a law suit to get such orders in place, and show the abuse to make sure to get primary custody.
If orders are already in place, you would be filing a motion to modify and base it on drug abuse and placing the child in dangerous situations. Either way you should consult with an attorney and probably hire one. Good luck to you and your child.
This answer is intended for informational and educational purposes only and should not be considered legal advice nor forming the attorney client relationship. This attorney is licensed in Texas.
You would need to file in family court to get custody changed and perhaps to get the current custodial parent's visitation changed to supervised. (The court can also order drug treatment and testing.)
Although I have answered the question to try to help you, you should consult with a lawyer in your area in person on the matter. In addition, my answer does not establish an attorney-client relationship between us.
Sign up to receive a 3-part series of useful information and advice about child custody law.