The standard phrase for tastes bad is 难吃. But plenty of stuff tastes bad without being edible. For instance toothpaste. I performed a google search for:
难吃的牙膏
finding no exact and just one near match.
So, how to express tastes bad, when the subject is not edible?
味道不好的牙膏 ?
苦口的牙膏 ?
Perhaps only for bitter pastes?