LONDON — A British judge on Wednesday banned the publication of stolen photographs of Pippa Middleton after allegations that 3,000 personal images were taken in a hacking attack on her iCloud account.

High Court justice Philippa Whipple made the order after Middleton, sister of the Duchess of Cambridge, and her fiancĂ© James Matthews went to court against the “person or persons unknown” who are responsible for the hack.

Whipple said Middleton feared that “other private information beyond photographs” had been taken.

Middleton “has good reason to fear that all the information held in her iCloud account has been accessed,” the judge said.

The Sun newspaper said Saturday it was contacted by a purported hacker seeking at least 50,000 pounds ($65,000) for the photos. It said the seller communicated using the pseudonym “Crafty Cockney” on an encrypted messaging service and sent sample photos showing Middleton being fitted for a wedding dress in advance of her wedding next year.

The Sun said the hacker also claimed to possess Middleton’s informal images of sister Kate with her children, Princess Charlotte and Prince George, and naked images of Matthews.

Police arrested a 35-year-old man Saturday on suspicion of offenses under the Computer Misuse Act. He was later released on bail pending further inquiries.

Middleton’s lawyer, Adam Wolanski, said the alleged theft had caused Middleton “considerable distress.” He said he believed the hack was genuine but the perpetrator had not been identified yet.