IRS REFERENCE
A nonresident alien temporarily in the United States as a
nonimmigrant on an "F-1," "J-1," "M-1," "Q-1," or "Q-2" visa is not
subject to social security and Medicare taxes on pay for services
performed to carry out the purpose for which the alien was admitted to
the United States. Social security and Medicare taxes should not be
withheld or paid on this amount. This exemption from social security
and Medicare taxes also applies to employment performed under
Curricular Practical Training and Optional Practical Training, on or
off campus, by foreign students in "F-1," "J-1," "M-1" or "Q"
nonimmigrant status as long as the employment is authorized by the U.S.
Citizenship and Immigration Service. However, if an alien is considered
a resident alien, that pay is subject to social security and Medicare
taxes even though the alien is still in one of the nonimmigrant
statuses mentioned above.