Being the victim of a crime is bad enough. But imagine if being a crime victim also meant the perpetrator could suddenly access all of your private electronic data—your emails, text messages, social-media history and even GPS location history—without your permission or  knowledge.

In recent years, criminal defense attorneys have sought to establish a new constitutional “right,” grounded in the Fifth and Sixth Amendments, for criminal defendants to access crime victims’ and crime witnesses’ private electronic communications. Instead of subpoenaing victims and witnesses directly, they are subpoenaing email and social-media service providers to try to obtain the private records of their account holders surreptitiously. And some trial courts are forcing the providers to turn over their users’ data.