The vulnerability lies in the fallback error and exception renderers in the Yii framework. The provided commit d386d737861c9014269b7ed8c36c65eadb387368 modifies the CApplication.php file.
Specifically, the functions displayError and displayException within the CApplication class were updated.
Before the patch, these functions directly outputted error messages, file paths, line numbers, and exception details (including stack traces) into HTML without proper sanitization. This made them susceptible to Reflected Cross-Site Scripting (XSS) if an attacker could control any part of the data being displayed (e.g., by causing an error with a malicious message).
The patch introduces a new private method htmlEncodeInternal which uses htmlspecialchars to encode the output. This new method is then used to wrap the previously vulnerable variables within displayError and displayException before they are echoed.
Therefore, CApplication::displayError and CApplication::displayException are the functions that were vulnerable and would appear in a runtime profile when the vulnerability is triggered.