Miggo Logo

CVE-2025-52888: Allure Report allows Improper XXE Restriction via DocumentBuilderFactory

7.5

CVSS Score
3.1

Basic Information

EPSS Score
0.1522%
Published
6/25/2025
Updated
6/25/2025
KEV Status
No
Technology
TechnologyJava

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
io.qameta.allure.plugins:xunit-xml-pluginmaven<= 2.34.02.34.1
io.qameta.allure.plugins:junit-xml-pluginmaven<= 2.34.02.34.1
io.qameta.allure.plugins:trx-pluginmaven<= 2.34.02.34.1

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability is a classic XML External Entity (XXE) injection affecting three different plugins in Allure Framework: xunit-xml-plugin, junit-xml-plugin, and trx-plugin. The root cause is the same across all three plugins: they use the standard Java DocumentBuilderFactory to parse XML files from the test results directory without properly securing the parser. Specifically, they fail to disable Document Type Definitions (DTDs) and external entity expansion.

The patch cbcb33719851ff70adce85d38e15d20fc58d4eb7 addresses this by:

  1. Introducing a custom ClasspathEntityResolver that only allows resolving DTDs from the application's classpath, effectively blocking external entities from remote or local file system locations.
  2. Setting factory.setValidating(false) to disable DTD validation.
  3. Applying this secure configuration (builder.setEntityResolver(new ClasspathEntityResolver())) to the DocumentBuilder in each of the affected plugins before parsing the input XML file.

The vulnerable functions are the ones that instantiate the insecure XML parser and use it to parse user-controlled files. By analyzing the patch, I identified the following methods where the insecure parsing occurs:

  • io.qameta.allure.xunitxml.XunitXmlPlugin.parseAssemblies
  • io.qameta.allure.junitxml.JunitXmlPlugin.parseRootElement
  • io.qameta.allure.trx.TrxPlugin.parseTestRun

These functions are the direct entry points for the vulnerability. When Allure generates a report, it calls these methods to process XML test result files. An attacker can place a malicious XML file containing an XXE payload in the results directory. When the vulnerable function is called, the parser will process the malicious payload, leading to information disclosure (e.g., reading local files like /etc/passwd) or Server-Side Request Forgery (SSRF). The new test cases added in the patch confirm this behavior by attempting to read a local file via an XXE payload and asserting that the file's content is not present in the final report, proving the fix is effective.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

### Summ*ry * *riti**l XML *xt*rn*l *ntity (XX*) vuln*r**ility *xists in t** xunit-xml-plu*in us** *y *llur* *. T** plu*in **ils to s**ur*ly *on*i*ur* t** XML p*rs*r (`*o*um*nt*uil**r***tory`) *n* *llows *xt*rn*l *ntity *xp*nsion w**n pro**ssin* t*st

Reasoning

T** vuln*r**ility is * *l*ssi* XML *xt*rn*l *ntity (XX*) inj**tion *****tin* t*r** *i***r*nt plu*ins in *llur* *r*m*work: `xunit-xml-plu*in`, `junit-xml-plu*in`, *n* `trx-plu*in`. T** root **us* is t** s*m* **ross *ll t*r** plu*ins: t**y us* t** st*n