CVE-2025-25197:
Silverstripe cross-site scripting (XSS) attack in elemental "Content blocks in use" report
5.4
CVSS ScoreBasic Information
Technical Details
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
dnadesign/silverstripe-elemental | composer | >= 2.1.2, < 5.3.12 | 5.3.12 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
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.