If Democrats win either chamber of Congress in November's midterm elections, they could be granted valuable information: President Trump’s tax returns, as well as the returns of his company, the Trump Organization.

Tucked into the tax code is a provision that allows select officials – the chairman of either the House of Representatives, Senate, or a special joint committee on taxes shared between the two chambers – to request specific tax returns from individuals or entities.

But the law governing that power could pose difficulties for Democrats if they take control of either chamber of Congress with a mandate to investigate Trump's taxes. It places limits on public release of that information to protect taxpayer privacy – even the president's.

Tuesday’s extensive New York Times report into the Trump's accounting practices throughout his business career has generated renewed interest within the party for that goal. On Wednesday, the Senate Finance Committee’s top Democrat, Sen. Ron Wyden of Oregon, committed to requesting Trump’s returns if midterm elections gave Democrats a majority on the panel and gave Wyden its gavel.

“Over a year and a half ago I asked Chairman Hatch to allow the Finance Committee to review Trump’s tax returns,” Wyden said in a statement. “I’m going to make the same request next Congress whether Senate Democrats are in the majority or the minority. A decision on what to do with those documents will be made when the Committee has reviewed them.”

But even if Democrats were to win a chamber of Congress in midterm elections and gain control of a committee with the power to demand Trump’s returns from the Treasury Department, the law requires the information be kept confidential unless authorized by the taxpayer in question. Even if Democrats request and receive the documents from the Treasury Department, Trump would have to consent to making his own tax information or that of his company public.

Democrats know the power to request Trump’s returns could put them in a serious bind: After publicly calling for Congress to request Trump’s tax returns for two years as a transparency measure, they might have the power to request that sensitive information but not disclose it publicly.

“It’s a very narrow thing as to what they can do,” said Dean Zerbe, a Republican former investigative counsel for the Senate Finance Committee and current national managing director at Alliantgroup, a tax consulting firm. Zerbe likened the situation to having a magic lamp but not being able to rub it.

If Democrats obtain Trump's returns, the available methods to satisfy their base's calls for transparency could be tricky, and fraught with legal, and potentially political, peril.

Leaking private tax information of anyone, even that of the president or other high profile officials, comes with stiff penalties, primarily up to five years in prison. That may put congressional Democrats in the awkward spot of obtaining politically damaging information about Trump that would be a felony to divulge.

It’s possible the information could be legally disseminated among House or Senate members in what’s called an "executive session," a closed-door meeting of a committee or chamber. Democrats could then test the limits of the constitutional right of legislators to speak freely without fear of repercussion from the executive branch, known as the "speech and debate" clause, by telling the public the information they were told about Trump's taxes. But it’s unclear the maneuver would waive legal penalties for disclosing personally sensitive information.

Another option would be requesting that the Government Accountability Office or Joint Committee on Taxation study Trump’s individual and business returns, with parameters set for a report that could legally be made public. Doing so would be difficult, though, for the same reasons that the committees can’t simply release his returns.

For practical purposes, if Democrats do request the president’s tax information, one or both entities could end up with his information: Both GAO and JCT have far more tax lawyers than the House Ways and Means Committee or Senate Finance Committee, and there’s precedent for the JCT to review a president’s returns. Former President Richard Nixon requested they do so in 1973 after skepticism grew that he’d paid is taxes in full, and the committee found that he owed the government nearly $500,000 (that scandal, rather than Watergate, prompted his famous line, “I am not a crook”).

JCT in particular has handled major tax investigations before, but in those cases the information was only released when the taxpayer consented, as was the case in an investigation into the Enron accounting scandal in the early 2000s, or there were enough taxpayers with information in the report to reasonably mask their identity, which would not be the case in a direct investigation into Trump or his business.

Finally, there’s also the nontrivial concern that releasing Trump's returns could set a precedent for exposing sensitive information of political opponents, regardless of which party holds power.

“I think you need to be cautious any time you wake up and say, ‘Well, we know who the sinner is, we just need to find the sin,’” said Zerbe.

Nevertheless, Democrats see an investigation into Trump's taxes and his personal finances as key to oversight of his administration.

“The more and more you get into the investigation, whether it’s obstruction of justice, whether it’s colluding with the Russians, whatever,” said Rep. Bill Pascrell D-N.J, in a brief recent interview. “The deeper that you get into those investigations the more you realize the key to all of this is his economic operations.”

Democrats, including Pascrell, have already pressed the issue in multiple venues, particularly during last year’s debate over tax reform. The New Jersey Democrat, along with several others in his party, questioned the lack of information about how Trump and his businesses might benefit from last year's tax overhaul.

Republicans, even those who believe Trump should release his returns, mostly dismiss the prospect as partisan rather than substantive.

“The Ways and Means Committee’s authority to request and make public any individual’s tax return is a powerful oversight tool to be used not for political fishing expeditions but to properly administer the tax code,” said Rep. Kevin Brady R-Texas, one of the chairmen with authority to request Trump’s returns from the Treasury Department, in a statement emailed to the Washington Examiner.

Brady argued that “most people don’t care about the president’s tax returns, they care about their own,” and added that’s why Republicans enacted tax cuts and are seeking more.

Still, Democrats see Trump’s tax returns as a winning campaign issue. A solid majority support the president disclosing what he pays the government and how much he makes, polls indicate.

“Democrats will probably raise this as an element of a message about how Trump needs to be checked,” said Andrew Bates, communications director for House campaigns at the liberal political organization American Bridge.