Miggo Logo

CVE-2025-25197:
Silverstripe cross-site scripting (XSS) attack in elemental "Content blocks in use" report

5.4

CVSS Score

Basic Information

EPSS Score
-
Published
4/10/2025
Updated
4/10/2025
KEV Status
No
Technology
TechnologyPHP

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
dnadesign/silverstripe-elementalcomposer>= 2.1.2, < 5.3.125.3.12

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot 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.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

*n *l*m*nt*l *lo*k **n in*lu** *n XSS p*ylo**, w*i** **n ** *x**ut** w**n vi*win* t** "*ont*nt *lo*ks in us*" r*port. T** vuln*r**ility is sp**i*i* to t**t r*port *n* is * r*sult o* **ilur* to **st input prior to in*lu*in* it in t** *ri* *i*l*. ###

Reasoning

T** vuln*r**ility li*s in t** `*l*m*ntsInUs*R*port` w**r* **t* *or r*port *olumns ('Titl*', '*l*m*ntSumm*ry', 'P***.Titl*') w*s r*n**r** wit*out prop*r s*nitiz*tion, l***in* to XSS. T** `*l*m*ntsInUs*R*port::*olumns` m*t*o* ***in*s *nonymous *un*tion