A.H.
She might be exploring - it is the right age for it. I would make sure her parents and the cousin understand that this upsets you and your son (I'm assuming it did upset him), and it is not acceptable behavior. I would also not let them be alone again, or even play at the cousin's house without you there, unless you can trust her parents to not leave them alone either.