Over strident Soviet objections, the United Nations Commission on Human Rights adopted a resolution today criticizing Soviet actions in Afghanistan and calling on the Afghan government to put a stop to them.

The vote was 26 to 8, with eight abstentions, on a motion to support the report of U.N. special envoy Felix Ermacora, who spent a year interviewing Afghan refugees at the request of the committee.

His report, released at the start of the commission's annual session here, did not specifically name the Soviet Union but accused "foreign" troops in Afghanistan of having used chemical weapons and torturing civilians.

The 43-member commission is an advisory body to the General Assembly that prepares reports and submits nonbinding recommendations on various human rights issues. In addition to the Soviet Union and the Ukraine, which has separate U.N. membership, those opposing the Afghan measure were Bulgaria, East Germany, India, Libya, Mozambique and Syria. Congo, Cyprus, Finland, Jordan, Nicaragua, Peru, Tanzania and Yugoslavia abstained. The Mauritanian delegate was absent.

Like Ermacora's report, the resolution did not mention the Soviets by name. But it said the commission expresses "profound concern at the grave and massive violation of human rights in Afghanistan" laid out in the report. Moreover, it said, the commission "expresses its distress . . . at the widespread violations of the right to life, liberty and security of person, including the commonplace practice of torture against the Afghan regime's opponents, indiscriminate bombardments of the civilian population and the deliberate destruction of crops."

All these charges originally were made in Ermacora's report. Without naming them, the resolution called on the parties in Afghanistan to "apply fully the rules of international humanitarian law" and to let the International Committee of the Red Cross and other humanitarian bodies work freely to alleviate suffering in that country. It also called on the Afghan government to "put a stop to the grave and massive violation of human rights and in particular the military repression being conducted against the civilian population."

Ermacora said later that he had been accused by the Soviet Union of having had his report written by the CIA. Soviet delegate Vsevolod Sovinsky attacked Ermacora again today, saying he had written the report in only a few days and interviewed only "hireling bandits who are precisely the ones who commit crimes against Afghanistan."

The Afghan government refused entry to Ermacora when he was mandated to compile his report, and his interviews therefore took place only in Pakistan.

Sovinsky also accused Ermacora, an Austrian who as a teen-ager served in the German armed forces in World War II, of being a "neo-Nazi." As a U.N. civil servant Ermacora, who was present, was prevented from replying.

Mohammed Akbar Kherad of Afghanistan also called for rejection of the resolution, which he said was "an illicit document prefabricated in a CIA factory."

The resolution approved today marked the sixth successive year since the Soviet invasion of Afghanistan in December 1979 that the human rights commission has adopted a resolution expressing concern over human rights in that country. This year's resolution was considerably stronger, however, because it was based on Ermacora's report, the first U.N. document to spell out specific abuses committed by foreign troops occupying Afghanistan.

The resolution was presented by Australia, Belgium, Canada, Costa Rica, France, West Germany, Italy, Ireland, Japan, Liberia, Mauritania, the Netherlands, Singapore, Spain and Britain.

It supported Ermacora's report, called for an extension of his mandate for another year and ordered him to report to the U.N. General Assembly in the fall on the situation in Afghanistan.

In other action, the human rights body condemned violations in El Salvador and Guatemala and instructed investigators to monitor alleged abuses, Reuter reported.

The Associated Press reported that the commission voted 24 to 1 to condemn Israel for human rights violations in southern Lebanon. The United States cast the dissenting vote, and most western nations abstained.