The vulnerability lies in the ElementsInUseReport where data for report columns ('Title', 'ElementSummary', 'Page.Title') was rendered without proper sanitization, leading to XSS. The ElementsInUseReport::columns method defines anonymous functions (closures) for formatting the content of these columns. These closures were the points of vulnerability as they directly returned data (e.g., from $item->getSummary(), $item->getPageTitle(), or $item->Title) without ensuring it was safe for HTML rendering. The patch applies sanitization, primarily using SilverStripe\Core\Convert::raw2xml(), within these closures or ensures that the rendering process otherwise escapes the data, as confirmed by the updated test cases (specifically ElementsInUseReportTest::testXssEscaped). The vulnerable functions are these closures themselves, as they were responsible for processing and returning the potentially malicious input without adequate casting/sanitization. The names used (DNADesign\Elemental\Reports\ElementsInUseReport::columns::{closure}) are descriptive placeholders for how these anonymous functions, defined within the columns method, would be identified in a runtime context or stack trace.
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| dnadesign/silverstripe-elemental | composer | >= 2.1.2, < 5.3.12 | 5.3.12 |
Ongoing coverage of React2Shell