This question was a bit difficult to parse, but if I understand correctly you are asking what would happen if someone exploited a bug that even fully validating nodes accepted, such as the inflation bug that was exploited in 2010 or the inflation bug that was found but not exploited on the main network this year.
Ultimately it comes down to how much damage was done by the exploit weighed against how much disruption it could cause the ecosystem to reorganize the chain to a point before the exploit occurred. There are no real rules here because now we are no longer in the realm of machine consensus, but rather in the realm of human consensus. The longer such a bug goes unnoticed after being exploited, the greater disruption a reorganization would cause and the greater the amount of proof of work would have to be expended by miners to forge a new chain fork with more proof of work than the existing chain.
In general it's probably only likely for a bug to be reorganized away if it's caught within the first few hours; if it's caught days or weeks later then it would be incredibly difficult to reorganize away and a sufficiently severe exploit would probably bring up conversations around whether or not a hard fork would be appropriate. But it's hard to talk about such a scenario in general terms because the devil is in the details.