kone-net go-chat Path Traversal Vulnerability in File Controller
Vulnerability
A critical path traversal vulnerability has been identified in kone-net go-chat versions up to f9e58d0afa9bbdb31faf25e7739da330692c4c63. The issue resides in the GetFile function of the file go-chat/api/v1/file_controller.go, within the Endpoint component. This vulnerability allows remote attackers to read arbitrary files from the web server by manipulating the fileName parameter, exploiting a lack of input sanitization.
Impact
Exploitation of this vulnerability allows for arbitrary file read on the server, potentially leading to the disclosure of sensitive information.
Reproduction
To reproduce this vulnerability, send a request to the /file/ endpoint with a crafted fileName parameter that includes directory traversal sequences, such as '../../../../etc/passwd'. This will bypass the application's file path restrictions and access the specified file on the server.
Vulnerability Rating
Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.
