-
Notifications
You must be signed in to change notification settings - Fork 184
Description
Path Traversal Vulnerability in Mod Organizer
Affected Versions
- Test Version: Mod Organizer v2.5.2 (Latest Stable Version)
- Affected Versions: Presumed to be all versions v2.5.2 and earlier
Summary
A path traversal vulnerability was identified in Mod Organizer 2. When the application processes compressed archives containing absolute file paths, it fails to properly sanitize the entries, allowing files to be written to arbitrary locations on the host system. This enables unauthorized file creation outside the user-selected extraction directory.
Proof of Concept (PoC)
A test archive demonstrating the vulnerability is included as:
poc_path_traversal.zip
Compressed file contents:
Archive Entry Path: C:/test/poc_evidence.txt
File Content: "Path Traversal Proof of Concept"
When this compressed file is extracted using Mod Organizer 2, the file is written to C:\test\poc_evidence.txt instead of within the user-specified extraction directory.
Reproduction Steps
Environment
- Operating System: Windows 11 25H2 (26200.7171)
- Application: Mod Organizer v2.5.2
- Test File:
poc_path_traversal.zip
Reproduction Steps
-
Launch Mod Organizer 2
-
Attempt to install the attached
poc_path_traversal.zipfile via the Install Mod feature
-
Verify that the file is created at
C:\test\poc_evidence.txtinstead of within the intended extraction directory
Proposed Fix
The following security measures must be implemented when extracting compressed files:
1. Block absolute paths
- Reject paths starting with drive letters (e.g.,
C:,D:) - Remove leading slashes (
/) or backslashes (\\) indicating root paths
2. Verify extraction paths
- Ensure all files' final extraction paths are within the user-specified extraction directory
- Reject extraction and warn the user for paths outside the extraction directory