The security vulnerability is a stored Cross-Site Scripting (XSS) issue in the Message Boards feature of Liferay Portal. The root cause is not a flaw in a single function but a logical error in the composition of multiple data sanitization components.
The system uses a chain of 'sanitizer' classes to clean user input, orchestrated by the SanitizerUtil.sanitize method. The vulnerability arises because, prior to the patch, these sanitizers were executed in a non-deterministic order. One of the sanitizers, IFrameSanitizerImpl, is designed to un-escape HTML entities. When this sanitizer ran after other security sanitizers (like AntiSamySanitizerImpl) had already escaped malicious input (e.g., converting <script> to <script>), it would reverse the escaping, re-introducing the active XSS payload into the content before it was stored and displayed to other users.
The fix involves introducing a deterministic execution order for the sanitizers by adding a sanitizer.order property to each one and updating SanitizerUtil to respect this order. This ensures that the un-escaping step happens at the correct point in the process, preventing it from negating the effects of the other security filters. Any runtime profile capturing the exploitation of this CVE would show calls to SanitizerUtil.sanitize, which in turn would call the sanitize methods of the various sanitizer implementations.