When using the toFolder method to download file to a certain directory, a directory traversal vulnerability will occur when obtaining the file name based on the Content-Disposition returned by the server. If the filename returned by the server contains../`, directory traversal will occur.
问题描述
使用
toFolder
方法下载文件到某个目录时,根据服务端返回的Content-Disposition 获取文件名会出现目录穿越漏洞。如果服务端返回的filename包含
../`,文件就会被保存到其他路径下。When using the toFolder method to download file to a certain directory, a directory traversal vulnerability will occur when obtaining the file name based on the
Content-Disposition returned by the server. If the filename returned by the server contains
../`, directory traversal will occur.复现过程
Client:
Server:
使用的版本