GHSA-f63g-88cj-hjf9: Path Traversal

Published Aug 26, 2026
·
Updated

Summary

IzPack's UnpackerBase.unpack() resolves pack-file target paths without any canonical-path or directory-containment check. An attacker who distributes a trojanized installer JAR (the format is unsigned) can include pack entries whose targetPath contains ../ sequences. When a victim runs the installer the file is written to an attacker-chosen location on disk under the victim's privileges — including startup folders, PATH directories, or system locations.

Details

Vulnerable method: com.izforge.izpack.installer.unpacker.UnpackerBase.unpack() Source file: izpack-installer/src/main/java/com/izforge/izpack/installer/unpacker/UnpackerBase.java Vulnerable lines (5.2.4): ~618–627

The relevant code path is:

java String targetPath = packFile.getTargetPath(); // attacker-controlled String path = IoHelper.translatePath(targetPath, variables); // separator swap ONLY File target = new File(path); // no canonical check // ... mkdirs() then file is written to target

IoHelper.translatePath() (source: izpack-util/.../IoHelper.java) performs only file-separator character conversion ('/' ↔ File.separatorChar) and contains no security validation whatsoever. There is no call to getCanonicalPath(), no startsWith(installDir) containment check, and no normalisation of .. segments.

Because IzPack installer JARs carry no digital signature, an attacker can repack any legitimate installer with malicious PackFile entries. The file format is a standard ZIP with serialised resources — no integrity protection.

Confirmed unpatched in HEAD (fetched from GitHub, 2025): git show HEAD:izpack-installer/src/main/java/com/izforge/izpack/installer/unpacker/UnpackerBase.java \ | grep -n 'getCanonicalPath\|startsWith.install\|traversal' (no output — fix not present)

PoC

bash 1. Clone IzPack source and view the vulnerable code directly git clone --depth=1 --branch izpack-5.2.4 https://github.com/izpack/izpack.git sed -n '615,650p' izpack/izpack-installer/src/main/java/com/izforge/izpack/installer/unpacker/UnpackerBase.java

2. Compile and run the following Java reproducer (no IzPack classpath needed):

java // TestPathTraversal.java import java.io.;

public class TestPathTraversal { // Exact replication of IoHelper.translatePath() — separator swap, no security static String translatePath(String destination) { return destination.replace('/', File.separatorChar); }

public static void main(String[] args) throws Exception { String installDir = "/tmp/izpackinstall"; String maliciousPath = installDir + "/../../../tmp/ESCAPEDFILE";

// This is what UnpackerBase does: String path = translatePath(maliciousPath); File target = new File(path); // resolves traversal target.getParentFile().mkdirs(); try (FileWriter fw = new FileWriter(target)) { fw.write("Written outside install dir via IzPack path traversal\n"); } System.out.println("File written to: " + target.getCanonicalPath()); System.out.println("Inside installDir: " + target.getCanonicalPath().startsWith(new File(installDir).getCanonicalPath())); } }

bash javac TestPathTraversal.java && java TestPathTraversal Output: File written to: /tmp/ESCAPEDFILE Inside installDir: false

Impact

Any user who runs an IzPack-generated installer is affected. The attacker only needs to distribute a repackaged installer — a common social-engineering vector. On Windows (the primary IzPack platform) the victim typically runs the installer as a local administrator, so the attacker can write to %APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup, %SystemRoot%\System32, or any other location reachable by the victim user. On Linux/macOS the same applies for user-writable locations.

No authentication, no special privileges and no interaction beyond running the installer are required on the victim side.

Credits This issue was identified by Michał Majchrowicz, Marcin Wyczechowski, and Paweł Zdunek, members of the AFINE Team.

Affected Software

1 affected component
maven/org.codehaus.izpack:izpack-installer<=5.2.6

Event History

Aug 26, 2026
Advisory Published
via GitHub·02:24 PM
Data Sourced
via GitHub·02:24 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

Who is exposed to exploitation?

Users who run a trojanized IzPack installer JAR are exposed. The installer format is unsigned, and the attacker does not need prior privileges, but the victim must run the installer.

2

What level of access can an attacker obtain through a successful exploit?

The attacker can write files to attacker-chosen locations using the privileges of the user running the installer. The advisory identifies startup folders, PATH directories, and system locations as possible targets.

3

Does path translation prevent directory traversal on affected installations?

No. The path translation routine only converts file-separator characters and does not validate canonical paths or enforce that targets remain within an intended installation directory.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203