Sirach 21:27

27 When the ungodly curseth Satan, he curseth his own soul.

Sirach 21:27 In-Context

25 The lips of talkers will be telling such things as pertain not unto them: but the words of such as have understanding are weighed in the balance.
26 The heart of fools is in their mouth: but the mouth of the wise is in their heart.
27 When the ungodly curseth Satan, he curseth his own soul.
28 A whisperer defileth his own soul, and is hated wheresoever he dwelleth.

The Brenton translation of the Septuagint is in the public domain.