The employer may provide salary information, including a W-2, about an employee to an accountant, whether that accountaccountant is also an employee of the employer, or an independent contractor hired by the employer. Normally a contrastcontract (pror a company policy) will impose a duty of confidentiality on the accountant. If no such duty is explicitly imposed, there is quite likely an implied duty of confidentiality.