Marriage once valid is valid forever. It can’t become invalid. Even if someone deceives an actual ecclesiastical court (“tribunal”) or the court makes an honest mistake in declaring a valid marriage invalid, then that doesn’t invalidate the marriage and the marriage stays valid forever. Simply put, once you validly enter into marriage, it stays valid forever, not gonna change.
An invalid marriage can indeed become valid without being fully contracted anew. This happens in two ways: simple convalidation (with a renewal of consent, not necessarily by both parties) or radical sanation (without a renewal of consent, but consent must still be there for radical sanation to be valid). In some cases radical sanation can be granted without one or even either party knowing. Simple convalidation too can happen with one party not knowing (e.g. canon 1159 §2 case of a defect of consent that can’t be proven), although naturally, at least one party knows because a renewal of consent is required.
Here are the laws:
vatican.va/archive/ENG1104/__P46.HTM
vatican.va/archive/ENG1104/__P47.HTM
Impediments still need to be dispensed or have ceased (i.e. no longer be there) in either case. In case of simple convalidation, the new consent must also be valid (invalid new consent does not convalidate).