There's a tendency on the Internet to pin this or that fine sentiment to this or that ancient Greek, often with little or no evidence. So with this one, we're suspicious of any "quotations" that give only a name (e.g. Xenophon) without citing an actual written source. In fact, there is nothing in the works of Xenophon that might associate him with it, though of course we'd be happy to be proven wrong.
This particular sentiment was in fact common to the entire culture of ancient Greece, and was voiced in many ways by many authors. It seems most succinctly articulated by Sophocles, who has his chorus sing toward the end of Oedipus Colonaeus (verses 1722f.),
κακῶν γὰρ δυσάλωτος οὐδείς — literally, "For no one is immune to suffering."