It is plainly illegal for foreigners to contribute to American political campaigns. But reform groups are warning that the ban would be gravely undermined by a little-noticed bill advanced Thursday by Republicans on the House Ways and Means Committee.

It would alter the current tax code provision that, while permitting the identity of donors to 501(c) “social welfare” groups to be kept firmly secret from the public, requires that the donors be privately identified to Internal Revenue Service officials responsible for enforcing the law. Politically oriented groups claiming dubious exemptions as “social welfare” nonprofits have proliferated in recent elections, allowing donors — including publicity-shy campaign backers — to work from the shadows.

Under the proposal, the I.R.S. would no longer be told the identities of contributors to these nonprofits. Watchdog groups warn in a letter to the House that this would “open the door wide for secret, unaccountable money from foreign governments, foreign corporations and foreign individuals to be illegally laundered into federal elections.” The letter, signed by the Brennan Center for Justice, the Campaign Legal Center, Democracy 21 and five other groups, stressed that the disclosure requirement is one of the few ways of guarding against foreigners influencing American elections.