ציטירנדיקער פּירוש אויף יהושע 10:26

וַיַּכֵּ֨ם יְהוֹשֻׁ֤עַ אַֽחֲרֵי־כֵן֙ וַיְמִיתֵ֔ם וַיִּתְלֵ֕ם עַ֖ל חֲמִשָּׁ֣ה עֵצִ֑ים וַיִּֽהְי֛וּ תְּלוּיִ֥ם עַל־הָעֵצִ֖ים עַד־הָעָֽרֶב׃

און יהוֹשועַ האָט זײ דערנאָך געשלאָגן, און האָט זײ געטײט, און זײ אױפֿגעהאַנגען אױֿף פֿינף בײמער; און זײ זײַנען געהאַנגען אױף די בײמער ביזן אָװנט.

Ibn Ezra

a hanged man is a curse of God since he blasphemed against God . But the simple explanation is that God is the source of the curse, which will descend everywhere close to the hanged man. There is a mysterious aspect to this curse which attaches itself to human life. Accordingly, Scripture says you shall not defile your land. This passage is necessarily placed in close proximity to the passages describing warfare (as it is written: “When you go out in war…” [: 10]). As demonstrated in the Gibeonite War [Joshua 10: 27], the reason behind must not remain overnight is not the dignity of the corpse, but rather, the dignity of the land. In this respect it does not matter whether the dead body be Canaanite or Israelite.
פֿרעגט אַ רבֿBookmarkShareCopy

Or HaChaim

ונתן מלכיהם בידך, "He will deliver their kings into your hand, etc." You will capture them alive. We have proof of this in Joshua 10,26.
פֿרעגט אַ רבֿBookmarkShareCopy