Please don’t even consider the idea of using violence to solve this problem. If you do hit her, you are condoning violence. Is that what you really want? Or do you want to solve the problem?
Your friend can’t take back what he did (having sex with the first girl) but he can and should talk to the second girl himself and ask her to stop spreading the information around, even if the information is true. But both you and your friend can set a much better example by doing things right from now on. Using violence in this situation would only exacerbate the situation and make both of you look foolish.
I get that the “loud mouth” is disliked by most, if not all, of the other students, but if either one of you resorts to violence, it will make you look like a bully and a fool. You guys need to learn how to make better decisions about what you do in life, and to learn how to make better decisions about handling disputes.
The word is already out, about your friend having sex. Just ignore the “loud mouth” and simply don’t engage her. If everyone at your school, just stops engaging her, she’ll stop, because she’ll no longer have an audience. If you hit her, you will be saying to everyone that Violence is Good and We are Powerless to do Anything Else Don’t become one of those people. Rise above the pettiness and show this “loud mouth” how to become a better person by your own example.