The vulnerability as described in ISO/IEC 24772-1:2024 6.53 applies to C++. In particular, any construct described by ISO/IEC 14882:2023 as “undefined behaviour” [EWF] is unsafe and should be avoided.
To avoid the vulnerability or mitigate its ill effects, C++ software developers can:
Apply the avoidance mechanisms of ISO/IEC 24772-1:2024 6.53.5 and ISO/IEC TR 24772-3:2020 6.53.2.
Enable checks that warn about unsafe operations.
Apply static analysis tools to detect unsafe constructs.