From the IRS website:
The IRS has issued regulations outlining the responsibility of tax preparers regarding protection of client information. Section 7216(a) provides for criminal penalties on tax return preparers who knowingly or recklessly make unauthorized disclosures or uses of information furnished to them to prepare a client’s tax return. The exception is when the taxpayer provides the tax preparer with a written consent to the disclosure. The taxpayer must knowingly and voluntarily provide consent. The consent statement must provide the names of the taxpayer and the tax return preparer, the specific purpose for the disclosure (e.g., obtaining a mortgage), and the tax information that may be disclosed. The taxpayer must be provided with a copy of the consent form. If no specific time frame is outlined to make the consent valid, the default is that the consent is valid for one year form the date signed.