Federal agencies have taken advantage of legal loopholes to collect massive amounts of personal information from cell phone and internet users without congressional or judicial authorization for years, but that practice is being challenged by a bipartisan and bicameral group of lawmakers who introduced legislation on Wednesday that would prevent the U.S. government from buying individuals’ information from data brokers without a court order.

Led by Sen. Ron Wyden (D-Ore.), a group of 20 senators introduced the Fourth Amendment Is Not For Sale Act (pdf) in the upper chamber of Congress. Reps. Jerry Nadler (D-N.Y.) and Zoe Lofgren (D-Calif.) also unveiled an equivalent bill in the House.

By closing major loopholes in federal privacy laws—including the Electronic Communications Privacy Act and the Foreign Intelligence Surveillance Act—the newly proposed legislation seeks to protect everyone in the U.S. from unlawful searches and seizures, one of the key civil liberties spelled out in the Bill of Rights.

In a press release (pdf), the lawmakers said that “while there are strict rules for consumer-facing companies—phone companies like AT&T and Verizon and tech companies like Google and Facebook—loopholes in the law currently permit data brokers and other firms without a direct relationship to consumers to sell Americans’ private information to the government without a court order.”

Media reports in the past year “revealed that a data broker named Venntel is selling location data collected from Americans’ smartphones to government agencies,” the lawmakers continued. “While it would be unlawful for app developers to sell data directly to the government, a legal loophole permits app developers to sell data to a data broker, which can then sell that data to the government.”

“Another controversial data broker, Clearview.AI, has compiled a massive database of billions of photos, which it downloaded in bulk from Facebook, LinkedIn, Twitter, and YouTube, in violation of their terms of service,” the lawmakers added. “Clearview.AI uses these illicitly obtained photos to power a facial recognition service it sells to government agencies, which they can search without a court order.”

The Fourth Amendment Is Not For Sale Act would require law enforcement agencies to obtain a court order before accessing data about people through third-party brokers that “aggregate and sell information like detailed user location data, surreptitiously gathered from smartphone apps or other sources,” The Verge reported Wednesday.

As Free Press Action explained, the bill would also prevent “police and intelligence agencies from buying data on people if the information was obtained from a user’s account or device, or via deception, hacking, violations of a contract, privacy policy, or terms of service.”

In addition, the bill would close loopholes that enable the national security state to buy metadata about U.S. residents’ international calls, texts, and emails, and to collect records about their web browsing of foreign websites. While this is information that would typically require a warrant to access, the intelligence community has found ways to circumvent the Fourth Amendment, routinely violating individuals’ constitutional rights in the process.

“Intelligence and law enforcement agencies have an unhealthy interest in the personal information of people in the United States—which their historical abuses have repeatedly demonstrated is dangerous to our democracy,” Sean Vitka, senior policy counsel for Demand Progress, said in a statement.

Calling the proposed legislation “foundational to the future of privacy,” Vitka added that “the founders meant it when they protected our rights against warrantless searches. Intelligence and law enforcement agencies must come to understand that the American people are off limits to warrantless mass surveillance, no matter how it is done.”

In what Free Press Action called “one of the most alarming examples” of unconstitutional surveillance, the U.S. military has been purchasing location and other personal data extracted from prayer and dating apps popular with millions of Muslim users.

“This kind of tracking is an abuse of power and a violation of our Fourth Amendment right to privacy… [and] a harsh truth is that regardless of which party is in power, immigrant communities and people of color are disproportionately targeted,” the organization noted.

According to Free Press Action, U.S. Customs and Border Protection and Immigration and Customs Enforcement “regularly purchase location-tracking data from shady ‘data mining’ tech companies. The privacy and civil rights implications of this are staggering—and mean that the communities that were targeted most by the Trump administration remain at risk under the Biden administration.”

Sandra Fulton, government relations director at Free Press Action, said that “every time federal agents buy data from unregulated and exploitative data brokers they’re violating the spirit of the Fourth Amendment.”

“The intelligence community has manipulated legal loopholes to create a sweeping public-private surveillance mechanism that targets immigrants, people of color, and other vulnerable communities,” she said. “The bill is a much needed response to repeated abuses by federal agencies.”

Fulton added that “it’s time we shut down these dangerous practices, and ensure that the Fourth Amendment is not a relic of the past.”

This article first appeared at Common Dreams and is reprinted with permission.