Vulnerabilities in pkg:maven/io.qameta.allure/allure-generator
PACKAGECVE-2026-55847 is a MODERATE (CVSS 6.1) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Allure Report libraries in the Maven ecosystem. The issue involves stored xss via unescaped ansi helper in status message/trace rendering. Remediation is available by upgrading affected packages to version 2.39.0.
pkg:maven/io.qameta.allure/allure-generator
Vulnerability advisories affecting package pkg:maven/io.qameta.allure/allure-generator. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-gx93-m64w-5m6h | CVE-2026-55847 | MODERATE | Allure Report: Stored XSS via unescaped ANSI helper in status message/trace rendering |
| GHSA-64hm-gfwq-jppw | CVE-2026-33166 | HIGH | Allure Report has an Arbitrary File Read via Path Traversal in Attachment Processing (Allure 1, Allure 2, and XCTest Readers) |
CVE-2026-55847 at a Glance
Security Impact
CVSS: 6.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N).
How to Fix CVE-2026-55847
To remediate this vulnerability, upgrade all affected Allure Report dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
<dependency>
<groupId>io.qameta.allure</groupId>
<artifactId>allure-generator</artifactId>
<version>2.39.0</version>
</dependency>
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
mvn dependency:tree -Dincludes=io.qameta.allure
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2026-55847, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=io.qameta.allure
Analyze the terminal output to locate any version of Allure Report in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.39.0), your application is affected.
Note: The mvn dependency:tree -Dincludes=io.qameta.allure command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Allure Report, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-55847 Affected Allure Report Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
io.qameta.allure:allure-generator
|
Maven |
< 2.39.0
|
2.39.0
|
References
Frequently Asked Questions
What is CVE-2026-55847?
Which Allure Report versions are affected?
What version fixes CVE-2026-55847?
Is allure-generator affected?
What is the CVSS score of CVE-2026-55847?
What CWE is associated with CVE-2026-55847?
How can I check Maven dependencies for CVE-2026-55847?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-gx93-m64w-5m6h",
"modified" : "2026-06-19T21:15:53Z",
"published" : "2026-06-19T21:15:53Z",
"aliases" : [ "CVE-2026-55847" ],
"summary" : "Allure Report: Stored XSS via unescaped ANSI helper in status message/trace rendering",
"details" : "## Summary\n\nThe `ansi.js` Handlebars helper in allure-generator passes user-controlled `statusMessage` and `statusTrace` values from test result files through the `ansi-to-html` library and wraps the output in Handlebars `SafeString` without HTML escaping. Since `ansi-to-html` does not escape HTML entities by default, an attacker who can influence test result content (e.g., via crafted JUnit XML failure messages) can inject arbitrary JavaScript that executes when anyone views the generated Allure report.\n\n## Details\n\nThe vulnerability is an incomplete fix — commit `4c64b19` (PR #3271) fixed XSS in `linky.js` and `text-with-links.js` by adding `escapeExpression()`, but the same pattern in `ansi.js` was not addressed.\n\n**Vulnerable sink** — `allure-generator/src/main/javascript/helpers/ansi.js:10-11`:\n```javascript\nexport default function (input) {\n return new SafeString(ansiConverter.toHtml(input));\n};\n```\n\nThe `AnsiToHtml` constructor at line 4 does not set `escapeForHtml: true`:\n```javascript\nconst ansiConverter = new AnsiToHtml({\n fg: \"black\",\n bg: \"black\",\n newline: true,\n});\n```\n\nThe `ansi-to-html` library (v0.7.2) defaults `escapeForHtml` to `false`, meaning HTML entities in the input pass through unchanged. Wrapping the result in `SafeString` tells Handlebars to skip its auto-escaping, so the raw HTML reaches the browser.\n\n**Template usage** — `allure-generator/src/main/javascript/blocks/status-details/status-details.hbs:7,10`:\n```handlebars\n<pre class=\"status-details__message\"><code>{{ansi statusMessage}}</code></pre>\n...\n<pre class=\"{{b 'status-details' 'trace'}}\"><code>{{ansi statusTrace}}</code></pre>\n```\n\n**Source** — `plugins/junit-xml-plugin/src/main/java/io/qameta/allure/junitxml/JunitXmlPlugin.java:307-308`:\n```java\nresult.setStatusMessage(element.getAttribute(MESSAGE_ATTRIBUTE_NAME));\nresult.setStatusTrace(element.getValue());\n```\n\nThese values are read directly from XML attributes with no sanitization. The same pattern exists in TRX, xUnit XML, xctest, and Allure1/2 plugins.\n\n**Contrast with the fixed helper** — `linky.js` (post-fix) correctly escapes before wrapping in `SafeString`:\n```javascript\nconst safeText = escapeExpression(text);\nreturn new SafeString(`<a href=\"${safeText}\" ...>${safeText}</a>`);\n```\n\n## PoC\n\n1. Create a malicious JUnit XML test result file:\n\n```xml\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<testsuite name=\"XSSTest\" tests=\"1\" failures=\"1\">\n <testcase name=\"xssPayload\" classname=\"com.example.Test\">\n <failure message=\"<img src=x onerror=alert(document.cookie)>\">\n Stack trace: <img src=x onerror=alert('statusTrace_XSS')>\n </failure>\n </testcase>\n</testsuite>\n```\n\n2. Generate an Allure report:\n\n```bash\nallure generate /path/to/results-with-malicious-xml -o /tmp/allure-report\n```\n\n3. Open the report and navigate to the failed test case:\n\n```bash\nallure open /tmp/allure-report\n```\n\n4. When viewing the test's status details, the `<img onerror>` payloads execute JavaScript in the viewer's browser.\n\n## Impact\n\n- **Arbitrary JavaScript execution** in the browser of anyone viewing the generated Allure report\n- **Cookie theft, session hijacking** if the report is served from a domain with active sessions (e.g., CI dashboards)\n- **Data exfiltration** — the injected script can read the full report content and send it to an attacker-controlled server\n- **Attack vectors**: A malicious dependency that throws crafted exception messages, a CI pipeline processing test results from untrusted pull requests, or a contributor submitting test files containing XSS payloads\n- Allure reports are commonly hosted on CI/CD platforms (Jenkins, GitLab, GitHub Actions artifacts) where session cookies may be present\n\n## Recommended Fix\n\nConfigure `AnsiToHtml` with `escapeForHtml: true` to escape HTML entities while preserving ANSI-to-HTML conversion:\n\n```javascript\nimport AnsiToHtml from \"ansi-to-html\";\nimport {SafeString} from \"handlebars/runtime\";\n\nconst ansiConverter = new AnsiToHtml({\n fg: \"black\",\n bg: \"black\",\n newline: true,\n escapeForHtml: true, // Escape HTML entities in non-ANSI input\n});\n\nexport default function (input) {\n return new SafeString(ansiConverter.toHtml(input));\n};\n```\n\nThis is the correct approach because it preserves the ANSI escape sequence → HTML conversion (colored output) while ensuring that any non-ANSI HTML in the input is safely escaped. The alternative of using `escapeExpression()` on the input would destroy ANSI sequences before they could be converted.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "io.qameta.allure:allure-generator"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.39.0"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 2.38.1"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/allure-framework/allure2/security/advisories/GHSA-gx93-m64w-5m6h"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/allure-framework/allure2"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-06-19T21:15:53Z",
"nvd_published_at" : null
}
}