Reputation networks deal with that just fine. If someone’s recommendations/referrals turn out to be incompetent, it reflects back in the person making them.
The friend has to be significantly less competent than required for this to work, but they only need to be less competent than other candidates to have a negative impact on hiring.