CVE-2024-56828 File upload in n/a
Attackers can upload malicious files via the avatar endpoint due to missing extension validation, potentially leading to remote code execution.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- None listed
What is CVE-2024-56828?
CVE-2024-56828 is a critical vulnerability in n/a, published on 6 Jan 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official 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.
Weakness: CWE-434
Which versions are affected by CVE-2024-56828?
It affects 1 product.
Products include 1000mz Chestnutcms.
How do I fix CVE-2024-56828?
No fix has been published for CVE-2024-56828 yet. Limit exposure of the affected software until one is available.
Is CVE-2024-56828 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-56828 exists.
Other vulnerabilities in n/a
Sources
Also known as GHSA-2423-2c9w-8vgr.