CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-28208

Junrar Path Traversal: Arbitrary File Write via Backslash Confusion

Alon Barad
Alon Barad
Software Engineer

Feb 27, 2026·5 min read·135 visits

Executive Summary (TL;DR)

Junrar versions prior to 7.5.8 contain a critical path traversal flaw on POSIX systems. Attackers can embed files with backslash-containing names (e.g., '..\..\etc\passwd') in RAR archives. These bypass validation but are processed as directory separators during extraction, allowing arbitrary file writes and potential RCE.

A path traversal vulnerability in the Junrar Java library allows attackers to overwrite arbitrary files on Linux and Unix systems. The flaw arises from a semantic discrepancy in how backslash characters are handled during file validation versus file creation. By crafting a RAR archive with Windows-style path separators, an attacker can bypass directory traversal checks and write files outside the intended extraction directory, potentially leading to Remote Code Execution (RCE).

Vulnerability Overview

Junrar is a widely used open-source Java library for extracting RAR archives. A security vulnerability identified as CVE-2026-28208 affects versions prior to 7.5.8, specifically when running on non-Windows operating systems (Linux/Unix). The vulnerability allows for directory traversal, enabling the extraction of files to locations outside the intended destination directory.

The issue falls under CWE-22 (Improper Limitation of a Pathname to a Restricted Directory). Unlike typical path traversal bugs where the application fails to sanitize ../ sequences, this vulnerability exploits a platform-specific interpretation of the backslash (\) character. While Windows treats backslashes as directory separators, POSIX systems treat them as valid literal characters within a filename. This discrepancy leads to a bypass of the library's security controls, resulting in arbitrary file write capabilities.

Root Cause Analysis

The vulnerability is rooted in a logical inconsistency between the validation phase and the file creation phase within LocalFolderExtractor.java. The library attempts to prevent path traversal by resolving the canonical path of the extraction destination and ensuring it starts with the intended target directory.

However, on Linux and Unix systems, the java.io.File API interprets backslashes (\) as literal characters, not directory separators. When the validation logic processes a malicious entry name like ..\..\etc\passwd, File.getCanonicalPath() treats the entire string as a single filename located inside the destination directory. Since no directory traversal is detected by the OS at this stage, the path validation check passes successfully.

Crucially, after validation, the library performs a manual path reconstruction to support Windows-style archives. The makeFile method explicitly splits the entry name using backslashes (name.split("\\\\")) and reassembles it using the system's native file separator (which is / on Linux). This transformation effectively converts the literal backslashes—which passed validation—into functional directory separators, executing the directory traversal that the validation step failed to detect.

Code Analysis

The vulnerability existed in how the LocalFolderExtractor class handled file paths. Below is the logic flow demonstrating the flaw and the subsequent fix.

Vulnerable Logic (Simplified):

The code first validates the path using getCanonicalPath. On Linux, dest/..\file resolves to exactly that path, satisfying the startsWith check. Later, the file is created by splitting on backslashes.

// Vulnerable implementation in LocalFolderExtractor.java
private File createFile(FileHeader fh, File destination) {
    // 1. Validation: On Linux, backslashes are NOT separators.
    // A path like "..\\..\\evil.sh" is seen as a valid filename.
    File f = new File(destination, fh.getFileName());
    if (!f.getCanonicalPath().startsWith(destination.getCanonicalPath())) {
        throw new Exception("Malicious path");
    }
    return f;
}
 
// Later, in makeFile or similar logic:
// 2. Reconstruction: The filename is split by backslash and rejoined with '/'
// converting the "safe" filename into a traversal path.
String[] parts = fh.getFileName().split("\\\\");
File current = destination;
for (String part : parts) {
    current = new File(current, part);
}

Patched Logic:

The fix introduces input normalization before any validation occurs. The helper method invariantSeparatorsPathString replaces all backslashes with forward slashes. This ensures getCanonicalPath correctly identifies and resolves traversal attempts regardless of the OS.

// Fixed implementation in Commit 947ff1d
private File createFile(final FileHeader fh, final File destination) throws IOException {
    // FIX: Normalize backslashes to forward slashes BEFORE validation
    String name = invariantSeparatorsPathString(fh.getFileName());
    
    File f = new File(destination, name);
    // Now "../../evil.sh" is correctly resolved and rejected
    if (!f.getCanonicalPath().startsWith(destination.getCanonicalPath())) {
        throw new IllegalStateException("Rar contains file with invalid path");
    }
    return f;
}
 
static String invariantSeparatorsPathString(String path) {
    return path.replace("\\", "/");
}

Exploitation Methodology

To exploit this vulnerability, an attacker must craft a RAR archive containing a file entry with a specific naming convention and induce a victim to extract it on a vulnerable Linux/Unix system.

Step-by-Step Attack Vector:

  1. Archive Creation: The attacker creates a RAR archive. Using a hex editor or a custom script (e.g., Python), they modify a file header to include backslash sequences targeting a sensitive location. For example: ..\..\..\..\home\victim\.bashrc.
  2. Delivery: The archive is delivered to the target application, which uses Junrar for extraction.
  3. Validation Bypass: The application calls createFile. The Linux filesystem interprets the filename as a literal string. The canonical path remains within the extraction root, bypassing the security check.
  4. Path Transformation: The library's extraction logic splits the filename by \ and rejoins it with /. The path becomes ../../../../home/victim/.bashrc.
  5. Execution: The content is written to the target file. If the attacker overwrites a shell profile, cron job, or authorized keys file, they achieve Remote Code Execution (RCE) the next time that resource is used.

Impact Assessment

The impact of CVE-2026-28208 is rated as Medium (CVSS 5.9), primarily due to the complexity requirement (AC:H) that the application must process a malicious file on a specific OS type (non-Windows). However, the practical impact is severe if these conditions are met.

Consequences:

  • Arbitrary File Write: Attackers can write files anywhere the application process has write permissions. This is not limited to the extraction directory.
  • Remote Code Execution (RCE): By overwriting configuration files (e.g., /etc/cron.d/*, ~/.ssh/authorized_keys, or web server scripts), an attacker can execute arbitrary commands on the host system.
  • Denial of Service: Critical system files could be corrupted or overwritten, rendering the application or the host system unstable.

The vulnerability does not affect Windows deployments because java.io.File on Windows correctly interprets backslashes as separators, allowing the canonical path check to function as intended.

Official Patches

JunrarOfficial fix commit on GitHub

Fix Analysis (1)

Technical Appendix

CVSS Score
5.9/ 10
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N
EPSS Probability
0.11%
Top 100% most exploited

Affected Systems

Junrar < 7.5.8 running on LinuxJunrar < 7.5.8 running on macOS/Unix

Affected Versions Detail

Product
Affected Versions
Fixed Version
Junrar
junrar
< 7.5.87.5.8
AttributeDetail
CWE IDCWE-22
CVSS v3.15.9 (Medium)
Attack VectorNetwork (User Interaction Required)
ImpactArbitrary File Write / RCE
Exploit StatusPoC Available
EPSS Score0.11%

MITRE ATT&CK Mapping

T1083File and Directory Discovery
Discovery
T1059Command and Scripting Interpreter
Execution
CWE-22
Path Traversal

Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Known Exploits & Detection

GitHub AdvisoryAdvisory containing description of the Python script PoC

Vulnerability Timeline

GHSA Advisory Published
2026-02-26
Patch Commit Pushed (v7.5.8)
2026-02-26
CVE Assigned
2026-02-27

References & Sources

  • [1]GHSA-j273-m5qq-6825 Advisory
  • [2]NVD - CVE-2026-28208

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•2 days ago•CVE-2026-16454
4.3

CVE-2026-16454: Object-Level Authorization Bypass in Eclipse hawkBit Direct Device Integration Controller

CVE-2026-16454 is an object-level authorization bypass vulnerability (CWE-284, CWE-862) in Eclipse hawkBit versions 1.0.3 and prior. The flaw exists within the Direct Device Integration (DDI) REST controller (hawkbit-ddi-resource), where endpoints responsible for enumerating software module metadata and serving firmware binaries fail to verify whether the requested software module is assigned to the authenticated device. Consequently, any device with valid credentials (such as a TargetToken or GatewayToken) can enumerate software module identifiers and download arbitrary firmware artifacts across the entire tenant namespace.

Amit Schendel
Amit Schendel
11 views•9 min read
•2 days ago•CVE-2026-62284
8.6

CVE-2026-62284: Remote Code Execution and SSRF via Unsanitized Kubeconfig in OSAC Operator

CVE-2026-62284 (GHSA-5w5g-j6hw-6p8f) is a code injection and server-side request forgery vulnerability in the console-proxy component of the OSAC Operator. The RemoteConfigResolver parses Kubernetes Secrets containing kubeconfig files via clientcmd.RESTConfigFromKubeConfig without sanitizing execution-related fields. An attacker with RBAC permissions to create or modify labeled Secrets in monitored namespaces can supply a malicious exec credential plugin, resulting in arbitrary command execution within the console-proxy pod.

Amit Schendel
Amit Schendel
8 views•8 min read
•2 days ago•CVE-2026-62361
5.5

CVE-2026-62361: Authenticated SQL Injection and Table Access Control Bypass in Listmonk Subscriber Export

CVE-2026-62361 (GHSA-xgjr-7j9q-2h4r) is an authenticated SQL injection and authorization bypass vulnerability in listmonk, an open-source, self-hosted newsletter and mailing list manager written in Go. In versions prior to 6.2.0, the subscriber export endpoint (GET /api/subscribers/export) directly interpolates user-supplied SQL filter expressions into a PostgreSQL query without invoking the table allowlist validation function (validateQueryTables). Consequently, authenticated users possessing the subscribers:sql_query and subscribers:get_all permissions can bypass relational access controls, execute arbitrary subqueries against restricted tables such as users and settings, and modify database state via writable Common Table Expressions (CTEs).

Alon Barad
Alon Barad
10 views•11 min read
•2 days ago•CVE-2026-28385
5.0

CVE-2026-28385: Server-Side Request Forgery in Canonical LXD Image Import

CVE-2026-28385 (GHSA-3gq2-x4qg-p4g6) is a Server-Side Request Forgery (SSRF) vulnerability in Canonical LXD versions 4.12 through 6.9. An authenticated user possessing the can_create_images entitlement can force the LXD daemon to execute arbitrary outbound HTTP and HTTPS requests via the /1.0/images API endpoint. Due to the absence of egress destination validation, an attacker can probe host loopback services, RFC 1918 private network segments, and cloud Instance Metadata Services (IMDS) from the network position of the privileged LXD daemon.

Amit Schendel
Amit Schendel
10 views•9 min read
•2 days ago•GHSA-9J25-MM2H-2F76
9.9

CVE-2026-48750: Arbitrary File Write on Host via exec-output Symlink in Canonical LXD and Incus

Canonical LXD and LXC Incus contain an arbitrary file write vulnerability (CWE-73 / CWE-59) in the `/1.0/instances/<name>/exec` REST API endpoint. When an instance is unpacked from an image archive, top-level symbolic links are extracted directly onto the host filesystem within the instance storage directory. If a crafted image includes a symbolic link named `exec-output` pointing to an arbitrary host path, invoking the execution endpoint with `record-output: true` causes the privileged host daemon to follow the symlink and write command output files directly to the target host directory. An authenticated attacker with permissions to import images and execute commands can exploit this flaw to write controlled content to sensitive host directories such as `/etc/cron.d`, resulting in arbitrary code execution on the host as `root`.

Alon Barad
Alon Barad
8 views•12 min read
•2 days ago•GHSA-VGHH-5RFX-XHQ8
9.9

CVE-2026-48749: Arbitrary Host File Read and Write via Malicious Image Symlink in Canonical LXD and Incus

CVE-2026-48749 (tracked as GHSA-vghh-5rfx-xhq8 for LXD and GHSA-2q3f-q5pq-g8wv for Incus) is a critical container escape vulnerability in the Canonical LXD and Linux Containers Incus system container managers. By importing a specially crafted container image archive containing duplicate tar member headers, an authenticated attacker can replace the instance rootfs directory with a symbolic link pointing to the underlying host root filesystem. When performing file operations on a stopped container, the privileged forkfile helper binary resolves the symbolic link without confinement and chroots directly into the host filesystem, granting arbitrary root-level file read and write access.

Amit Schendel
Amit Schendel
8 views•9 min read