(Genesis 3:14-15) Our Rabbis taught: A wayward woman set her eyes on one who was not fit for her; what she sought was not given to her, and what was in her hand was taken from her. And so we find with the primeval serpent, who set his eye on what was not fit for him, and what was in his hand was taken from him. The Holy One, blessed be He, said: I said that he should be king over every beast and animal; now "cursed are you more than all the beasts." I said that he should walk upright; now "upon your belly you shall go." I said that his food should be the food of man; now "dust you shall eat." He said, I will kill the man and take Eve; now "I will set enmity between you and the woman." And so we find with Cain and Korah and Balaam, Doeg and Ahitophel and Gehazi, Absalom and Adonijah and Uzziah and Haman, who set their eyes on what was not fit for them: what they sought was not given to them, and what was in their hand was taken from them.
The Serpent Grasped at What Was Not His and Lost All
Yalkut Shimoni on Torah 29:1
(בראשית ג יד-טו) שָׁנוּ רַבּוֹתֵינוּ, סוֹטָה נָתְנָה עֵינֶיהָ בְּמִי שֶׁאֵינוֹ רָאוּי לָהּ, מַה שֶׁבִּקְּשָׁה לֹא נִתַּן לָהּ וּמַה שֶׁבְּיָדָהּ נָטְלוּ הֵימֶנָּה וְכֵן מָצִינוּ בְּנָחָשׁ הַקַּדְמוֹנִי שֶׁנָּתַן עֵינוֹ בְּמַה שֶּׁאֵינוֹ רָאוּי לוֹ וּמַה שֶׁבְּיָדוֹ נָטְלוּ הֵימֶנּוּ, אָמַר הַקָּדוֹשׁ בָּרוּךְ הוּא אֲנִי אָמַרְתִּי יְהֵא מֶלֶךְ עַל כָּל בְּהֵמָה וְחַיָּה עַכְשָׁו אָרוּר (הוּא) [אַתָּה] מִכָּל הַבְּהֵמָה, אֲנִי אָמַרְתִּי יְהַלֵּךְ בְּקוֹמָה זְקוּפָה עַכְשָׁו עַל גְּחֹנְךָ תֵלֵךְ, אֲנִי אָמַרְתִּי יְהֵא מַאֲכָלוֹ מַאֲכַל אָדָם, עַכְשָׁו עָפָר תֹּאכַל, הוּא אָמַר אֶהֱרֹג אֶת הָאָדָם וְאֶשָּׂא אֶת חַוָּה, עַכְשָׁו וְאֵיבָה אָשִׁית בֵּינְךָ וּבֵין הָאִשָּׁה, וְכֵן מָצִינוּ בְּקַיִן וְקֹרַח וּבִלְעָם דּוֹאֵג וַאֲחִיתוֹפֶל וְגֵיחֲזִי וְאַבְשָׁלוֹם וַאֲדוֹנִיָה וְעֻזִּיָּה וְהָמָן שֶׁנָּתְנוּ עֵינֵיהֶם בְּמַה שֶּׁאֵינוֹ רָאוּי לָהֶם מַה שֶׁבִּקְּשׁוּ לֹא נָתְנוּ לָהֶם, וּמַה שֶׁבְּיָדָם נָטְלוּ מֵהֶם.