binary-husky gpt_academic Path Traversal Vulnerability Leading to Remote Code Execution

Vulnerability

A path traversal vulnerability has been identified in binary-husky gpt_academic, specifically in version git 310122f. The application allows the extraction of user-uploaded 7z files without adequate validation. This oversight, combined with the behavior of the Python py7zr package—which does not ensure that extracted files remain within the designated directory—creates an opportunity for attackers to exploit the vulnerability. By crafting a malicious 7z file, an attacker could perform arbitrary file writes, potentially leading to remote code execution.

Impact

Exploitation of this vulnerability allows for arbitrary file read and write operations, which can result in remote code execution. For instance, an attacker could write to the SSH key file, modify the crontab, or alter the gpt_academic application code itself.

Reproduction

To reproduce this vulnerability, first set up the gpt_academic application and ensure the py7zr package is installed. After uploading a crafted 7z file that exploits the path traversal vulnerability, the application will execute the payload contained within the file, demonstrating the remote code execution impact.

Added: Jun 9, 2025, 7:46 PM
Updated: Jun 9, 2025, 7:46 PM

Vulnerability Rating

Custom Algorithm
spread
0.0
impact
10.0
exploitability
4.6
remediation
0.0
relevance
0.0
threat
6.5
urgency
2.9
incentive
1.7

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.