It means that the person has revealed some information or a secret that he shouldn't have.
Another expression meaning the same thing is 'blabbermouth'.
Neither of these is the word or expression you are seeking. Of course, the word for just plain 'talkative' is 'loquacious'; and 'garrulous' for exceesively talkative on trivial matters; but you're looking for a good old piece of slang or an idiom. Unaccustomed as I am to having to say this any more, to any of my contemporaries, I'll have to think and try to remember what we said in the primary school playground.
The first that occurs to me is: "God, you can run on at the mouth!" - the oath is optional.
Another, meaning to talk incessantly, is 'talk nineteen to the dozen'.
Anyone else got favourites they want to share?