Deuteronomy 21:23:

His body shall not remain all night upon the tree, but thou shalt in any wise bury him that day; (for he that is hanged is accursed of God;) that thy land be not defiled, which the LORD thy God giveth thee for an inheritance.

See also:

Objection: We Should Never Teach That Jesus Was Cursed Because No One Speaking by The Holy Spirit Can Call Jesus Cursed (1 Corinthians 12:3)