If you shared or re-published any of the images of nude celebrities that leaked online earlier this month, you could be charged with a felony under a new Arizona law.

You could also be charged for sharing an image of a woman's unclothed breast while she's feeding her infant, or for publishing images of the stripped Abu Ghraib prisoners piled inhumanely in a pyramid. There's even potential risk from publishing the latest nip-slip image of a celebrity suffering a wardrobe malfunction or caught in an ungraceful sprawl while exiting a taxi sans underwear.

That's essentially the argument in a lawsuit filed in Arizona today by the American Civil Liberties Union on behalf of a coalition of media groups, libertarians and others who are challenging the law on the constitutional grounds that it restricts free speech and freedom of the press protections guaranteed under the First Amendment. They also say it violates the Fifth and Fourteenth Amendments, and is "unconstitutionally vague" and "vastly overbroad" in reach.

"States can address malicious invasions of privacy without treading on free speech, with laws that are carefully tailored to address real harms. Arizona’s is not," said Lee Rowland, staff attorney for the ACLU, in a statement.

Arizona's "anti-revenge porn" law, which went into effect in July, was passed with good intentions. Like a dozen other states that have passed similar laws since 2013, Arizona hoped to address the disturbing trend in which embittered lovers distribute nude images of ex-spouses and paramours in an effort to humiliate or cause professional or personal harm.

But unlike other states, which have narrowly restricted the reach of their laws or made the offense a misdemeanor instead of a felony, Arizona's law is so poorly written it affects just about anyone who shares or publishes any nude image without explicit consent.

Although Arizona's law is particularly draconian, Rowland says any law that criminalizes revenge porn is actually problematic.

"As a general matter, we don't criminalize gossip or other truthful but embarrassing information about people that we have relationships with," Rowland told WIRED. "Revenge porn does create acute harm for its victims, who are predominantly women, and I think it's valuable for lawmakers to have a conversation about how to offer victims of revenge porn relief. But there are many solutions, including civil law, that don't create an acute chill on protected speech like Arizona's law does."

The law makes it criminal to disclose, display, publish, or advertise any images of a person who is "in a state of nudity or engaged in specific sexual activities" if the person who shares or publishes the images "knows or should have known" that the person depicted in the image did not consent to "the disclosure."

"State of nudity" is defined as the "appearance of a human anus, genitals or a female breast below a point immediately above the top of the areola" or a "state of dress that fails to opaquely cover a human anus, genitals or a female breast below a point immediately above the top of the areola." Recent images of Rihanna in a see-through Swarovski-crystal gown could conceivably fall into this category. Although the law provides an exception for images "involving voluntary exposure in a public or commercial setting," it provides no definition of the terms.

The law places newspapers, photographers, librarians, art galleries, booksellers, and publishers at risk of committing a felony if they fail to obtain prior consent from anyone who appears in nude images they publish or distribute, whether the image is used for artistic purposes or for its news value.

This means you too could be in violation for simply sharing someone's nude selfie or the cute nude infant-on-a-rug image that your friend posted on Facebook if you don't obtain prior consent to share the pic. And situations that might otherwise fall under copyright and fair use laws could turn criminal if a blogger, for example, republished a nude "selfie" that someone self-posted on a widely-accessible social networking account without permission. The law doesn't require that the person in the picture have an expectation of privacy or that the person even be recognizable in the photograph.

Under the law, a woman who receives an unsolicited image of a man’s penis could also be convicted of a felony if she shares the photograph with anyone else. Even someone who publishes images of naked and dead Holocaust victims could be at risk, since the law provides no exception in circumstances where consent can no longer be obtained because the person has died.

Even when consent exists, it only applies to the initial publication or distribution of the image. Thereafter, anyone else who publishes or distributes the image must also obtain consent.

An individual who poses for a nude photo and gives consent to a commercial photographer for its distribution but later revokes that consent—either because he or she regrets the agreement or feels that compensation for the picture was inadequate—could make it a felony for anyone to further exhibit the image.

"If another person could unilaterally prevent you from sharing an image you initially had every right to share, that places a lot of power in a private party's hands," Rowland says.

The law does not establish when Arizona has jurisdiction to prosecute—for example, whether the person depicted in the image must be an Arizona citizen, whether the image was shared or published by someone who lives in Arizona or whether it's enough that an image was published on a web site that was viewed by residents of Arizona.

The law also doesn't specifically require that someone have malicious intent in sharing or publishing an image or that a person in the image is actually harmed by sharing the picture. This means, essentially, that "anyone who shares an image, even if their doing so is purely innocent and they have no reason to think the person pictured would object, is the same as a knowing invasion of privacy under the statute," Rowland said.

The consequences for violating the law are steep. Not only is it a felony punishable by up to three years and nine months in prison, it's also potentially a sex crime, requiring someone convicted of the law to register as a sex offender. In other words, "it has the potential of life-ruining consequences," Rowland said.

Sex offense registration laws apply if a judge finds there is a sexual motivation behind a crime. Given that the Arizona nude photo law that is categorized by the state under a list of sex offenses "it is presumably a sex offense," said Rowland. "And if a judge finds that any motivation behind a person who shares an image was sexual, they would be subject to the sex offender registration requirement. It certainly is not hard to imagine that someone who shares [a hacked image of a nude celebrity] because they think the person is beautiful could qualify as sexual motivation under this law."

And it's not farfetched to think that Arizona authorities would wield the law in a broad manner.

In 2008, authorities in Maricopa County, Arizona, considered launching a child porn investigation into the Phoenix New Times and its publisher for posting a series of images taken by Arizona artist and university professor Betsy Schneider of her own children. The images, from an exhibition of her work, included depictions of her naked children when they were infants. A Phoenix city attorney said at the time that if the photos were found to be illegal, “Everybody who picked up one those issues (of the New Times) could be prosecuted for possessing child pornography.”