WASHINGTON  Afghan private security forces with ties to the Taliban, criminal networks and Iranian intelligence have been hired to guard American military bases in Afghanistan, exposing United States soldiers to surprise attack and confounding the fight against insurgents, according to a Senate investigation.

The Pentagon’s oversight of the Afghan guards is virtually nonexistent, allowing local security deals among American military commanders, Western contracting companies and Afghan warlords who are closely connected to the violent insurgency, according to the report by investigators on the staff of the Senate Armed Services Committee.

The United States military has almost no independent information on the Afghans guarding the bases, who are employees of Afghan groups hired as subcontractors by Western firms awarded security contracts by the Pentagon. At one large American airbase in western Afghanistan, military personnel did not even know the names of the leaders of the Afghan groups providing base security, the investigators found. So they used the nicknames that the contractor was using  Mr. White and Mr. Pink from “Reservoir Dogs,” the 1992 gangster movie by Quentin Tarantino. Mr. Pink was later determined to be a “known Taliban” figure, they reported.

In another incident, the United States military bombed a house where it was believed that a Taliban leader was holding a meeting, only to discover later that the house was owned by an Afghan security contractor to the American military, who was meeting with his nephew  the Taliban leader.