"These images by no means represent the values or professionalism of the vast majority of U.S. troops serving in Afghanistan today," Panetta said.
An investigation into the photographs is under way, the Department of Defense said in a release Wednesday.
"Anyone found responsible for this inhuman conduct will be held accountable in accordance with our military justice system," said Pentagon press secretary George Little.
"I would simply echo the comments from the Pentagon that the conduct depicted in those photographs is reprehensible," Carney said. "It does not in any way represent ... the high standards of the U.S. military. And the president certainly shares in the defense secretary's opinion that this needs to be investigated, and it will be investigated, and that those responsible will be held accountable."
Carney said the administration is "very disappointed" the photos were published because of the danger it can create for U.S. troops and civilian personnel in Afghanistan.
A U.S. soldier said he gave the Los Angeles Times photos of American troops posing with body parts of Afghan insurgents to point up what he said are security risks.
The soldier, attached to the 82nd Airborne 4th Brigade Combat Team from Fort Bragg, N.C., said the 18 photos illustrate a breakdown in leadership and discipline he said he thought jeopardized troop safety, the Times reported.
The Army began a criminal investigation after the Times showed officials copies of the photos, the newspaper said.
"It is a violation of Army standards to pose with corpses for photographs outside of officially sanctioned purposes," Army spokesman George Wright said. "Such actions fall short of what we expect of our uniformed service members in deployed areas."
Once the investigation is completed, Wright said the Army would "take appropriate action" against military personnel involved.
Most of the soldiers in the photos have been identified, said Army spokeswoman Lt. Col. Margaret Kageleiry.
The 82nd Airborne Division soldiers were sent to investigate reports that Afghan police recovered the remains of an insurgent suicide bomber and were to try to use iris scans and fingerprints for identification, the Times said. After they inspected the body at a police station in Zabol province in February 2010, the paratroopers posed for photos next to Afghan police while some held the corpse's severed legs.
It happened again when the same platoon was dispatched a few months later to investigate the remains of three insurgents Afghan police said accidentally blew themselves up, the Times said. After obtaining fingerprints, they posed next to the remains, again grinning and mugging for photographs.
The soldier who turned the photos over to the Times said he hoped their publication would help ensure the alleged security failings at two U.S. bases where brigade members were stationed in 2010 weren't repeated. The brigade, which began another tour in Afghanistan in February, is under new command but still has some of the paratroopers who served in 2010.
Pentagon spokesman Navy Capt. John Kirby said the conduct shown in the photos "most certainly does not represent the character and the professionalism of the great majority of our troops in Afghanistan ... . Nevertheless, this imagery -- more than two years old -- now has the potential to indict them all in the minds of local Afghans, inciting violence and perhaps causing needless casualties."
Kirby said the military has taken "the necessary precautions to protect our troops in the event of any backlash."
The latest news about the photos is at least the fourth visual depiction of questionable behavior by coalition troops in recent years. Photos were published in the German publication Der Spiegel and Rolling Stone magazine. A video posted on the Internet showed four U.S. Marines urinating on Afghan corpses.
Already tense U.S.-Afghan relations were strained more by inadvertent burning of copies of the Koran at a U.S. base in February. The incident triggered the deaths of six Americans and riots in which 30 people died.
In March, a U.S. Army sergeant was accused of going on a nighttime shooting spree in two Afghan villages, killing 17.
2014: NFL Cheerleaders [PHOTOS]