Arbitrary file upload in 1000mz Chestnutcms
CVE-2024-56828
File Upload vulnerability in ChestnutCMS through 1.5.0. Based on the code analysis, it was determined that the /api/member/avatar API endpoint receives a base64 string as input. This string is then passed to the memberService.uploadAvatarByBase64 method for processing. Within the service, the base64-encoded image is parsed. For example, given a string like: data:image/html;base64,PGh0bWw+PGltZyBzcmM9eCBvbmVycm9yPWFsZXJ0KDEpPjwvaHRtbD4= the content after the comma is extracted and decoded using Base64.getDecoder().decode(). The substring from the 11th character up to the first occurrence of a semicolon (;) is assigned to the suffix variable (representing the file extension). The decoded content is then written to a file. However, the file extension is not validated, and since this functionality is exposed to the frontend, it poses significant security risks.
Vulnerability class: Unrestricted File Upload
Published · last modified .
CVSS v3 metric
CVSS v3 base score 9.8 (Critical). Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
EPSS exploit prediction
EPSS: 0.009 (57.6th percentile), scored .
Very low probability of exploitation in the next 30 days; routine patching cadence is appropriate. 58th percentile — 57.6% of CVEs in the catalogue have a lower EPSS than this one. How to read EPSS.
EPSS over last 30 days · oldest: 0.009 · newest: 0.009 · change: 0.000
Affected products
Weakness classification (CWE)
References
- gitee.com/liweiyi/ChestnutCMS (Product)
- www.1000mz.com/ (Product)
- github.com/Zerone0x00/CVE/blob/main/ChestnutCMS/CVE-2024-56828.md (Exploit, Third Party Advisory)
Frequently asked questions
- What is CVE-2024-56828?
- CVE-2024-56828 is a critical-severity vulnerability in 1000mz Chestnutcms, classified under Unrestricted Upload of File with Dangerous Type. CVSS score: 9.8/10. Published 2025-01-06.
- How severe is CVE-2024-56828?
- Critical severity. CVSS v3 base score is 9.8 out of 10.