"In a column from 1907, Pearson printed a paragraph supposedly from an old librarian's almanac. Response from colleagues and friends lead him to expand it to a 34 page pamphlet that was published in 1909 as The Old Librarian's Almanack. On the title page, the Almanack is described as "a very rare pamphlet first published in New Haven Connecticut in 1773 and now reprinted for the first time.'
The pamphlet was reviewed seriously by The New York Sun, The Nation, The New York Times, and several other publications before the hoax was generally known. In 1927, the magazine Public Libraries called the hoax 'a good piece of foolery, bright, clever, with the verisimilitude of authenticity.' Even today, a humorous faux-medieval Curse Against Book Stealers from the pamphlet continues to be portrayed as real."
And here is the curse:
"And what Condemnation shall befit the accurst Wretch (for he cannot justly claim the title of Man) who pilfers and purloins for his own selfish ends such a precious article as a Book? I am reminded of the Warning display'd in the Library of the Popish Monastery of San Pedro at Barcelona. This is the version English'd by Sir Matthew Manhan, who saw it writ in Latin in the Monastery, as he himself describes in his learn'd Book, Travels in Spanish Countries, 1712
"The Warning reads thus:
'For him that stealeth a Book from this Library,
let it change to a Serpent in his hand and rend him.
Let him be struck with Palsy,
and all his Members blasted.
Let him languish in Pain,
crying aloud for Mercy
and let there be no surcease to his Agony
till he sink to Dissolution.
Let Book-worms gnaw his Entrails
in token of the Worm that dieth not,
and when at last he goeth to his final Punishment
let the Flames of Hell consume him for ever and aye.'"
Reminds me a little of Hogwarts librarian Irma Pince's warning: "If you rip, tear, shred, bend, fold, deface, disfigure, smear, smudge, throw, drop, or in any other manner damage, mistreat, or show lack of respect towards this book, the consequences will be as awful as it is within my power to make them."
That was just a warning about messing up books, but apparently curses about stealing books were actually added during medieval times, when books were much harder to come by:
"It was traditional, particularly before the invention of the printing press when books were all hand written manuscripts, to letter a curse into the book to prevent theft. Unfortunately, it doesn't seem to have worked very well, as the books also had to be chained into place. Even chains had limited effect. Witness the many ancient libraries where there are still chains in place -- but no books."
From Littera Scripta
More on Book Curses from Virginia Commonwealth University.