that is not correct.
If a bona fide purchaser buys property without any notice of its defect the law does nothing to disturb it.
Furthermore, the law of equity will step in and protect the purchaser.
If the land has been held for over 15 years the law of adverse possession will step in and protect the occupier.
The action (if at all) is against the vendor.