In Harry Potter and the Deathly Hallows, it's revealed that Mad-Eye Moody (before his death) and the Order of the Phoenix set up protective curses around Severus Snape to verify his loyalty or protect him. One of these was the Tongue-Tying Curse, which would physically prevent someone from speaking about certain information. This is mentioned when Harry learns about the protections surrounding Snape and the Prince's Tale.