The vulnerability as documented in ISO IEC 24772-1:2024 6.50 exists in C++. C++ supports both the exception mechanism and the error return mechanism. This clause assumes that any exceptions thrown by an external library are compatible with C++, otherwise the result is either implementation-defined or undefined (see Inter-language calling [DJS]).
When calling a function from a library whose source code is not visible, an unknown exception can be thrown. For such cases, the exception thrown from such a function is guaranteed to be caught by catch(...). See Ignored Error Status and Unhandled Exceptions [OYB].
To avoid the vulnerability or mitigate its ill effects, C++ software developers can:
try-catch with an appropriate catch(...) handler.