Under Art. 99 of the Geneva Convention,
No prisoner of war may be tried or sentenced for an act which is not
forbidden by the law of the Detaining Power or by international law,
in force at the time the said act was committed.
No moral or physical coercion may be exerted on a prisoner of war in
order to induce him to admit himself guilty of the act of which he is
accused.
No prisoner of war may be convicted without having had an opportunity
to present his defence and the assistance of a qualified advocate or
counsel.
This limits crimes to acts which were crimes before being captured. In addition though not stated in the convention, only acts can be punished (e.g. you cannot be punished for "being Arab"). The death penalty is addressed in Art 100
Prisoners of war and the Protecting Powers shall be informed as soon
as possible of the offences which are punishable by the death sentence
under the laws of the Detaining Power.
Other offences shall not thereafter be made punishable by the death
penalty without the concurrence of the Power upon which the prisoners
of war depend.
The death sentence cannot be pronounced on a prisoner of war unless
the attention of the court has, in accordance with Article 87, second
paragraph , been particularly called to the fact that since the
accused is not a national of the Detaining Power, he is not bound to
it by any duty of allegiance, and that he is in its power as the
result of circumstances independent of his own will.
("the Power upon which the prisoners of war depend" refers to the nation, the Detaining Power, that captures them as opposed to the specific military unit / individual). The death penalty is thus a legal possibility.