26 USC 7431 - Civil damages for unauthorized inspection or disclosure of returns and return information

(a) In general 

(1) Inspection or disclosure by employee of United States 
If any officer or employee of the United States knowingly, or by reason of negligence, inspects or discloses any return or return information with respect to a taxpayer in violation of any provision of section 6103, such taxpayer may bring a civil action for damages against the United States in a district court of the United States.
(2) Inspection or disclosure by a person who is not an employee of United States 
If any person who is not an officer or employee of the United States knowingly, or by reason of negligence, inspects or discloses any return or return information with respect to a taxpayer in violation of any provision of section 6103 or in violation of section 6104 (c), such taxpayer may bring a civil action for damages against such person in a district court of the United States.
(b) Exceptions 
No liability shall arise under this section with respect to any inspection or disclosure
(1) which results from a good faith, but erroneous, interpretation of section 6103, or
(2) which is requested by the taxpayer.
(c) Damages 
In any action brought under subsection (a), upon a finding of liability on the part of the defendant, the defendant shall be liable to the plaintiff in an amount equal to the sum of
(1) the greater of
(A) $1,000 for each act of unauthorized inspection or disclosure of a return or return information with respect to which such defendant is found liable, or
(B) the sum of
(i) the actual damages sustained by the plaintiff as a result of such unauthorized inspection or disclosure, plus
(ii) in the case of a willful inspection or disclosure or an inspection or disclosure which is the result of gross negligence, punitive damages, plus
(2) the costs of the action, plus
(3) in the case of a plaintiff which is described in section 7430 (c)(4)(A)(ii), reasonable attorneys fees, except that if the defendant is the United States, reasonable attorneys fees may be awarded only if the plaintiff is the prevailing party (as determined under section 7430 (c)(4)).
(d) Period for bringing action 
Notwithstanding any other provision of law, an action to enforce any liability created under this section may be brought, without regard to the amount in controversy, at any time within 2 years after the date of discovery by the plaintiff of the unauthorized inspection or disclosure.
(e) Notification of unlawful inspection and disclosure 
If any person is criminally charged by indictment or information with inspection or disclosure of a taxpayers return or return information in violation of
(1) paragraph (1) or (2) of section 7213 (a),
(2) section 7213A (a), or
(3) subparagraph (B) of section 1030 (a)(2) of title 18, United States Code,

the Secretary shall notify such taxpayer as soon as practicable of such inspection or disclosure.

(f) Definitions 
For purposes of this section, the terms inspect, inspection, return, and return information have the respective meanings given such terms by section 6103 (b).
(g) Extension to information obtained under section 3406 
For purposes of this section
(1) any information obtained under section 3406 (including information with respect to any payee certification failure under subsection (d) thereof) shall be treated as return information, and
(2) any inspection or use of such information other than for purposes of meeting any requirement under section 3406 or (subject to the safeguards set forth in section 6103) for purposes permitted under section 6103 shall be treated as a violation of section 6103.

For purposes of subsection (b), the reference to section 6103 shall be treated as including a reference to section 3406.

(h) Special rule for information obtained under section 6103 (k)(9) 
For purposes of this section, any reference to section 6103 shall be treated as including a reference to section 6311 (e).