The troubled app Wag gave a dog-walker’s home address to an angry Brooklyn client, who barged into her apartment in the middle of the night and threw a fit over a “missing” pup, sources said Friday.

“She came in and told me she knows where I live and that she’s gonna kill me,” said the dog walker, Shonagh Cleary, who later learned the pooch was perfectly safe back at the owner’s home.

“I was shocked,” she said. “And my roommates were really scared.”

Cleary, a 19-year-old ASA College student in Brooklyn who walks dogs for extra cash, took a cute, ­5-year-old ­Havanese named Cece for an hour-long stroll Thursday in Cobble Hill. She returned the pup to an upscale 10th-floor apartment in Downtown Brooklyn, left the keys with a doorman and earned $12, she said.

But it appears that the owner came home drunk later that night and couldn’t find the pup — so she called the app and threatened to report the “lost” dog to police, prompting a Wag rep to give her Cleary’s home ­address, the student said.

The owner then banged on the dog-walker’s door at 1 a.m., pushed her way inside and shouted, “Where the f–k is my dog?” before making threats and calling her names, according to Cleary.

“I heard a loud bang on the door. I could tell right away she wasn’t sober — she stumbled and fell once or twice,” Cleary said.

“She was cursing at me and yelling, saying I want to sell her dog,” she said. “She said she was going to kill me.”

Cleary tried to reason with the woman, telling her “to check the building’s camera. I said, ‘The dog is still at the apartment, unless somehow someone broke in.’ ”

A Wag rep then called Cleary at 3 a.m. and told her the dog had been found safe inside the owner’s apartment.

“This woman is an idiot,” Cleary said. “How do you not know that your dog is in your own house?”

Wag later sent her a message apologizing.

“The information regarding your home was relayed to her by us with the intention that it was going to an active-duty police officer,” states the message, which was shared with The Post.

“I am so very sorry this had to happen tonight,” it notes. “The dog has been found within her home.”

But Cleary is still seething.

“It’s definitely a breach of privacy. For them to give out my address, that could do a lot of damage,” she said. “This whole thing has been crazy. And not worth $12.”

The privacy breach comes amid reports of at least four missing pooches and three dead dogs since Wag launched in 2014.

Wag officials said they were conducting an investigation about the mishap.

“We are very sorry for inadvertently giving out the walker’s address to a dog owner,” the company said in a statement.

“We are in close contact with the walker and have taken all the necessary steps to ensure she feels secure. Wag! takes the safety of its community seriously and is conducting an internal investigation to uncover why this happened.”