In 5e, is there any way to detect that a magic item is cursed?
The DMG (p. 139) says about cursed items:
Most methods of identifying items, including the identify spell, fail to reveal such a curse, although lore might hint at it. A curse should be a surprise to the item's user when the curse's effects are revealed.
It says "most methods" but then does not go on to describe which methods, if any, do reveal the curse on a cursed item. 5e doesn't seem to have an equivalent of analyze dweomer from earlier editions (which would reveal a curse on an item). I suppose a wish spell would do it.
Is there anything less powerful than wish that either (a) clearly does reveal the curse on a cursed item, or (b) that you rule in your game as a spell (or other method) that reveals the curse on a cursed item?
Although the quote says a curse should be a surprise, it does not say that a curse "must" always be a surprise. In the context of the first sentence which only says that "most" methods don't reveal the curse, that seems to still leave room for the curse occasionally not being a surprise if an unusual method is used that does reveal it.
What does "lore might hint at it" mean in practice? Does this mean that identify might identify an item by name, and that name might be something someone knows something about, if they make a relevant Arcana or History check? Or that just by the item's appearance, someone might recognize it as a famous cursed item? Something else?
I don't recall anything in the existing manuals that allows a "simple" way to detect curses. I believe they were trying to make curses more interesting to play. So, from the rules view there is no easy way to know if an item is cursed except by trial an error (It adds drama!).
An easy way out would be to house rule a curse-detecting clause to a spell (identify, for example), in the sense that it would detect the negative effect of using the item.
Other ways are to hint it to player. Lore, like you said, is a good approach. Legends, rumors, hystorical records could point to a certain object being cursed. Maybe there's a warning in the item's resting place or the PC sense something "not right" when they touch it.
The fact is that by allowing to easily detect a curse it cuts off a bit the point of it being cursed. Curses are meant to be narrative devices. If you want to avoid the hassle you can always reduce the "curse" to negative traits or flaw like the DMG suggest in the artifact section.