cve/2024/CVE-2024-56828.md

18 lines
1.3 KiB
Markdown
Raw Permalink Normal View History

2025-09-29 21:09:30 +02:00
### [CVE-2024-56828](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-56828)
![](https://img.shields.io/static/v1?label=Product&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Version&message=n%2Fa%20&color=brightgreen)
![](https://img.shields.io/static/v1?label=Vulnerability&message=n%2Fa&color=brightgreen)
### Description
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.
### POC
#### Reference
- https://github.com/Zerone0x00/CVE/blob/main/ChestnutCMS/CVE-2024-56828.md
#### Github
No PoCs found on GitHub currently.