There's two kinds of examples of this sort of thing in history to my recollection. The first of which is just curses a rather well known kind are several books recovered from Ashurbanipal’s library which where cursed with anti theft magic.
"Clay tablet of Ashurbanipal, King of the World, King of Assyria,
who trusts in Ashur and Ninlil. Your lordship is without equal,
Ashur, King of the Gods! Whoever removes [the tablet], writes
his name in place of my name, may Ashur and Ninlil, angered
and grim, cast him down, erase his name, his seed, in the land" (Libraries in the Ancient World by Lionel Casson pg12). These where put in the back indexes of several of the books in the library.
Another example of this where Curse tablets from Rome which served a variety of purposes though the most well known is spells against cheating carved on lead tables, the general principal was as well applied to theif's thus being another example of written word cursing those that steal books or objects.
The second kind is less a directed curse per say, but many authors of texts will include disclaimers as to the danger such as Éliphas Lévi
"To this occult power must be attributed the terrible influence resident in parental malediction, which is feared by all nations on earth, as also the imminent danger of magical operations when anyone has not reached the isolation of true adepts" (Éliphas Lévi Transcendental magic, its doctrine and ritual pg 125)
These are usually less interesting in the sense that one may incorrectly practice for instant working out to the level of self injury, the same considerations are often taken in the course of magic.