WASHINGTON — Texas counties have doled out millions of dollars in recent months to replace thousands of old touch-screen voting machines that lack a paper record – a weakness security experts warn could allow Russians or other hackers to rig U.S. elections without detection.

The problem is, many of the new machines have the same vulnerability. So do similar machines in more than a dozen states across the country.

Vicki Shelly, the election administrator in San Jacinto County, Texas, north of Houston, said she received no alert from Washington or state officials before the county spent $383,000 on its new paperless touch-screen voting system made by Hart InterCivic.

“Whoever’s doing all the research, it seems like we should have been in on it a little sooner,” said Shelly, one of hundreds of election officials that make up the first line of defense against attempts to tamper with U.S. election results. “Honestly, it’s very disturbing.”

Cyberexperts, including a team from the nation’s premier technology standards-setting lab, have warned since 2006 that hackers can plant vote-altering malware in electronic machines, and some now say the cyberattacks could occur at plants where the machines are made.

They say it’s crucial that touch-screen machines produce paper copies of ballots that can be audited to ensure the accuracy of electronic vote counts.

But an obscure federal agency charged with issuing election guidelines for state and local officials rejected the experts’ finding in 2007, and 11 years went by before it recently took steps to reverse itself.

As a result, 14 states still make at least partial use of paperless touch screens, including the swing state of Pennsylvania.

Five states – Delaware, Georgia, Louisiana, New Jersey and South Carolina – rely on them entirely, even though paper-based alternatives cost a fraction as much.

In addition to Texas, counties in Arkansas, Indiana, Kansas, Kentucky, Mississippi and Tennessee also use touch screens, while 11 Florida counties use them as accessible voting machines for the handicapped to mark their ballots.

That has left a gaping hole in U.S. election security heading into next fall’s midterm contests even as election officials brace for expected attacks from Russia and perhaps other countries.

In February, Justice Department special counsel Robert Mueller brought an indictment accusing 13 Russians and three companies of elaborate cyberattacks aimed at stirring chaos and helping Donald Trump capture the White House.

In March, a day after Homeland Security Secretary Kirstjen Nielsen said the U.S. lacks an effective way to audit elections, Congress allotted $380 million in a massive spending bill to help states and counties replace outdated, vulnerable voting equipment.

Still, the legislation urged, but did not require, that the money be used for machines that leave a paper trail.

And the funds are being pro-rated based on states’ populations, not on where touch-screens currently are used.

Many states will be unable to replace their paperless touch screens this year because of the late date and the lack of sufficient funding, despite a chorus of warnings from U.S. intelligence officials that Russian operatives will be back after attempting in 2016 to penetrate 21 state voter databases.