"And now you are cursed" (Joshua 9:23). Rabbi Eleazar said: he cursed them like the serpent, as it says, "And now you are cursed," and it is written, "And now you are cursed" (Genesis 3:14, of the serpent). And it is written, "And the men of Israel said to the Hivite" - and were they Hivites? Were they not Gibeonites? Rather, they acted as the serpent acted. The serpent said: I know that the Holy One, blessed be He, said to him, "On the day you eat of it you shall surely die" (Genesis 2:17). But I will go and deceive them, and they will go and act, and I will inherit the earth for myself. So too these said: we know that the Holy One, blessed be He, said, "You shall utterly destroy them" (Deuteronomy 20:17), and it is written, "You shall make no covenant with them or with their gods" (Deuteronomy 7:2). We will go, and they will cut a covenant with us. Whichever way you turn it: if they kill us, they will have transgressed the oath; if they let us live, they will have transgressed the decree. Either way they are punished, and they do not inherit the land.
The Gibeonites Cursed Like the Serpent in Eden
Yalkut Shimoni on Nach 19:3
וְעַתָּה אֲרוּרִים אַתֶּם (יהושע ט, כג) א"ר אלעזר אררן כנחש שנאמר ועתה ארורים אתם וכתיב ועתה ארור אתה, וכתיב ויאמר איש ישראל אל החוי וכי חוים היו והלא גבעונים היו אלא שעשו מעשה חוי אמר יודע אני שא"ל הקב"ה ביום אכלך ממנו מות תמות אלא הריני הולך ומרמה בהם והם הולכים ועושים ואני יורש הארץ לעצמי. כך אמרו אלו יודעים אנו שאמר הקב"ה החרם תחרימם וכתיב לא תכרות להם ולאלהיהם ברית הרינו הולכים והם כורתים עמנו ברית מה נפשך הורגים אותנו עברו על השבועה קיימו אותנו עברו על הגזרה בין כך ובין כך נענשין ואין יורשין הארץ: