/

CVE-2026-33166

Severity:

HIGH RISK

(8.6)

Path Traversal / Arbitrary File Read in Allure 2 Report

CVE-2026-33166

Analyzed

Vulnerability type

Category:

Path Traversal / Arbitrary File Read

CWE:

CWE-22

Impact:

Arbitrary File Read on the Allure Report Host

Severity:

HIGH RISK

(8.6)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Allure 2 report generator prior to version 2.38.0 contains a path traversal vulnerability that allows arbitrary file reads on the host while processing test result artifacts.

By crafting malicious result files that reference sensitive files as attachments, an attacker can cause Allure to embed those files into the generated test report under certain conditions.

Affected context

This vulnerability occurs when Allure 2 report generator processes test result artifacts (e.g., *-result.json, *-container.json, or .plist files) that describe attachments.

If these result files can be supplied or influenced by an attacker, and the Allure report generation process runs on a host where sensitive files are present, the generator may resolve attacker-controlled paths and read files outside the intended results directory.

The issue is typically exposed in CI/CD pipelines or build environments where Allure is invoked automatically over collected test results.

Exploit preconditions

  • Attack surface: Allure report generation process (CLI or integrated tool) that consumes test result files.
  • Required access: Ability to create, modify, or inject test result files (*-result.json, *-container.json, .plist) consumed by Allure.
  • Trigger point: Execution of the Allure report generator over a directory containing the crafted result files.
  • Why exploitation is possible: The generator trusts attachment source paths from result files and resolves them without enforcing confinement to an expected directory or applying robust path canonicalization and validation, enabling path traversal or out-of-scope file resolution.

Why this happens

The root cause aligns with CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').

Allure's report generator treats attachment source paths in result artifacts as trustworthy and resolves them directly on the host filesystem.

Without normalizing paths and enforcing that they remain within an allowed root (such as the test results directory or a dedicated attachments folder), an attacker-supplied path can reference arbitrary locations (e.g., via absolute paths or ../ segments).

This insecure pattern allows untrusted metadata to influence which files are read and subsequently embedded into the generated report.

Potential impact

  • Sensitive configuration files (e.g., application configs, CI secrets, keys) may be included in the generated report.
  • Credentials, tokens, or API keys stored on the host can be exposed through report artifacts.
  • Internal source code or proprietary files can be unintentionally published or leaked.
  • Further compromise of connected systems may be possible if exposed secrets are later abused by an attacker.

General mitigation guidance

Effective mitigation focuses on constraining file resolution and reducing trust in result metadata:

  • Enforce strict directory confinement for all attachment sources (e.g., only allow paths under a designated attachments root).
  • Normalize and canonicalize paths before access, rejecting any that attempt directory traversal or reference absolute filesystem locations.
  • Treat all test result artifacts as untrusted inputs, even when produced by automated tools or plugins.
  • Run report generation with least-privilege filesystem access, avoiding unnecessary read permissions to sensitive directories.
  • Segregate test-result processing environments from locations where highly sensitive files (keys, secrets) are stored.

How teams detect issues like this

Organizations can pursue several approaches to detect or monitor this class of issue:

  • Static analysis and code review: Look for file access logic that consumes paths from result files or metadata without canonicalization and strict root checks; pay attention to functions that join user-controlled paths with base directories.
  • Configuration and policy checks: Enforce CI/CD policies that restrict which directories the Allure process can read, using sandboxing, containers, or filesystem permissions.
  • Runtime monitoring: Log and review file access patterns during report generation, flagging attempts to read files outside the expected results or workspace directories.
  • Artifact inspection: Periodically inspect generated reports for unexpected embedded files (e.g., configuration snippets, keys, or system files) to uncover misuse or exploitation attempts.

Sources

SourceLink
github.comgithub.com/allure-framework/allure2/security/advisories/GHSA-64hm-gfwq-jppw

Frequently asked

questions

It can be, depending on how Allure is integrated. If an attacker can feed result files into a CI pipeline or service that runs Allure and later access the generated report, exploitation can occur without direct access to the host.

The attacker needs the ability to create or modify test result artifacts consumed by Allure (for example, by controlling a test runner, a results upload mechanism, or a repository path from which results are taken).

The safest pattern is to treat attachment paths in result files as untrusted, canonicalize them, and strictly enforce that all resolved paths stay within a predefined, controlled directory; any path that violates this rule should be rejected.

Adopt a consistent file-access policy that decouples external metadata from raw filesystem paths, apply robust path validation and directory whitelisting, minimize the filesystem privileges of reporting tools, and include checks for path traversal patterns in code review and automated security testing.

Find out what's already
exploitable in your codebase.