There's a fairly simple quirks algorithm that could be applied to malformed BBCode, which seems to be the algorithm used by Mozilla at least:
When breaking dangling open tags, append them as closed tags, then push new open tags onto the stack. (Effectively acting as though every bad [/tag] is preceded by the correct sequence of closing tags, followed by the same sequence of opening tags in reverse order.)
(This would be an opt-in feature, of course.)
Active
5.0
Core
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.