Zephyr Teachout, law professor at Fordham University and candidate for New York Attorney General, arrives for a press conference outside of Trump Tower in Midtown Manhattan, August 8, 2018 in New York City.

As President Donald Trump faces down special counsel Robert Mueller, he could soon be facing new legal challenges from New York, where Democrats vying for the role as the state's top prosecutor have all made hostility to the president a central part of their campaigns.

The latest polling shows the Democratic primary, which will be held Thursday, is a tossup between Rep. Sean Maloney, New York City public advocate Letitia James and Zephyr Teachout, a law professor at Fordham University who has written a book about political corruption. A fourth candidate, Leecia Eve, a former aide to Hillary Clinton, is trailing.

The state has a track record of taking on the Trump administration. The state sued Trump University in 2013 for defrauding students, part of a legal case which led to a $25 million settlement. In June, Attorney General Barbara Underwood filed a suit against the president's charitable foundation alleging a "pattern of persistent illegal conduct."

The candidates running to replace Underwood could take the legal challenge a step further. The attorney general position in New York presents a unique opportunity to go after the president because the deeply blue state is where he built his business empire.

New York is also where Trump headquartered his campaign, and the site of a number of events that have come under the scrutiny of federal prosecutors. Mueller is looking at a June 2016 meeting between a number of Trump's top campaign advisors and a Kremlin-linked attorney that occurred in Trump Tower, for instance.

Last month, Trump's former lawyer Michael Cohen pleaded guilty in federal court in New York to a number of violations related to the 2016 campaign.

The president's attorney, former New York City mayor Rudy Giuliani, has said that Trump has nothing to worry about because he has done nothing wrong. The White House did not respond to a request for comment from CNBC.

"Like we are seeing with the recent Cohen plea, there is a profound overlap between his campaign, his foundation, and his businesses, the beating heart of which is here in New York," Teachout said Wednesday at an event in front of Trump Tower in Manhattan. "So yeah, New York has an incredible opportunity to really investigate — stop — the central illegality of the Trump administration."

Asked if Trump should fear her, Teachout responded: "Yes."

Teachout, the only candidate who agreed to comment for this article, said that she would bring a lawsuit against Trump on "day one" of her term over alleged Emoluments Clause violations. James has also said she would investigate whether the president has violated the Emoluments Clause.