What creates liability is knowledge, not the defect itself. A leaky basement, a past flood or an unpermitted electrical job only becomes a legal problem for the seller once it is proven the seller knew and chose not to say so, which is why an honest conversation with your agent before listing matters more than the condition itself.
A buyer who discovers the hidden problem after moving in can pursue a claim for the cost of fixing it and related damages, and that claim can surface long after the deal closed and the deposit has already changed hands. A seller defending that kind of claim typically spends well past the standard $800 to $1,500 in legal fees for a routine closing.
Disclosing the problem upfront almost always costs less than hiding it, because a buyer who knows what they are getting prices around it instead of suing over it later. Get your hand-reviewed valuation from Joel Dyck.