Headline
GHSA-h7qf-qmf3-85qg: Allure Report allows Improper XXE Restriction via DocumentBuilderFactory
Summary
A critical XML External Entity (XXE) vulnerability exists in the xunit-xml-plugin used by Allure 2. The plugin fails to securely configure the XML parser (DocumentBuilderFactory
) and allows external entity expansion when processing test result .xml files. This allows attackers to read arbitrary files from the file system and potentially trigger server-side request forgery (SSRF).
Details
In \allure2-main\plugins\xunit-xml-plugin\src\main\java\io\qameta\allure\xunitxml\XunitXmlPlugin.java
the application uses DocumentBuilderFactory
without disabling DTDs or external entities. By generating a report with a malicious xml file within it, an attacker can perform XXE to leverage SSRF, or to read system files.
PoC
To recreate this vulnerability, you need to install allure for command-line (In my POC I used a Windows 11 Machine).
- Create a folder called
allure
, and within it, create a malicious XML file. I will attach my SSRF and file reading payloads, however, for the rest of the POC, I will focus on reading system files for better screenshots. ##SSRF (replace webhook link with your own)
##Reading System Files
- Put the malicious .xml file into the
allure
directory created previously - Run the following command to run the report
allure generate C:\path\to\directory\allure -o report --clean
- To view and confirm the executed payload, run
allure open report
- When the report opens, confirm the payload executedby going to
Categories > Product defects > <payload response>
Impact
The explained XXE vulnerability can lead to Arbitrary File Disclosure and Server-Side Request Forgery. This exploitation can also be carried out silently, meaning it can be carried out without user interaction if the tool is automated within an application, and can go undetected with a carefully crafted payload. This could allow a malicious actor to view other source codes which may contain API or product keys, internal application URLs, or other secret items. This makes it an especially high risk when ran within a CI/CD platform.
Summary
A critical XML External Entity (XXE) vulnerability exists in the xunit-xml-plugin used by Allure 2. The plugin fails to securely configure the XML parser (DocumentBuilderFactory) and allows external entity expansion when processing test result .xml files. This allows attackers to read arbitrary files from the file system and potentially trigger server-side request forgery (SSRF).
Details
In \allure2-main\plugins\xunit-xml-plugin\src\main\java\io\qameta\allure\xunitxml\XunitXmlPlugin.java the application uses DocumentBuilderFactory without disabling DTDs or external entities. By generating a report with a malicious xml file within it, an attacker can perform XXE to leverage SSRF, or to read system files.
PoC
To recreate this vulnerability, you need to install allure for command-line (In my POC I used a Windows 11 Machine).
- Create a folder called allure, and within it, create a malicious XML file. I will attach my SSRF and file reading payloads, however, for the rest of the POC, I will focus on reading system files for better screenshots.
##SSRF (replace webhook link with your own)
##Reading System Files
- Put the malicious .xml file into the allure directory created previously
- Run the following command to run the report allure generate C:\path\to\directory\allure -o report --clean
- To view and confirm the executed payload, run allure open report
- When the report opens, confirm the payload executedby going to Categories > Product defects > <payload response>
Impact
The explained XXE vulnerability can lead to Arbitrary File Disclosure and Server-Side Request Forgery. This exploitation can also be carried out silently, meaning it can be carried out without user interaction if the tool is automated within an application, and can go undetected with a carefully crafted payload. This could allow a malicious actor to view other source codes which may contain API or product keys, internal application URLs, or other secret items. This makes it an especially high risk when ran within a CI/CD platform.
References
- GHSA-h7qf-qmf3-85qg
- https://nvd.nist.gov/vuln/detail/CVE-2025-52888
- allure-framework/allure2@cbcb337