In LibTomCrypt through 1.18.2, the derdecodeutf8string function (in derdecodeutf8string.c) does not properly detect certain invalid UTF-8 sequences. This allows context-dependent attackers to cause a denial of service (out-of-bounds read and crash) or read information from other memory locations via carefully crafted DER-encoded data.