CVE-2026-2146
Unrestricted File Upload in yshopmall updateAvatar API
Publication date: 2026-02-08
Last updated on: 2026-04-29
Assigner: VulDB
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| guchengwuyue | yshopmall | to 1.9.1 (inc) |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-434 | The product allows the upload or transfer of dangerous file types that are automatically processed within its environment. |
| CWE-284 | The product does not restrict or incorrectly restricts access to a resource from an unauthorized actor. |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
CVE-2026-2146 is a security vulnerability in the yshopmall application version 1.9.1, specifically in the updateAvatar function of the /api/users/updateAvatar endpoint. The vulnerability arises because the file upload process does not properly validate or restrict the types of files that users can upload.
An attacker can exploit this flaw by uploading malicious files such as HTML or JSP scripts. These files are saved on the server without sufficient checks, enabling potential Cross-Site Scripting (XSS) attacks or even Remote Code Execution (RCE) if the malicious files are executed.
The vulnerability occurs due to the lack of validation in the file upload flow: the MultipartFile parameter is accepted without checks, passed through several service layers, and finally saved to disk at a canonical path without verifying the file type or content.
How can this vulnerability impact me? :
This vulnerability can have serious security impacts including allowing attackers to upload and execute malicious files on the server.
- Cross-Site Scripting (XSS) attacks, which can compromise user sessions, steal sensitive information, or deface the website.
- Remote Code Execution (RCE), enabling attackers to run arbitrary code on the server, potentially leading to full system compromise.
- Compromise of confidentiality, integrity, and availability of the affected system.
Since the vulnerability can be exploited remotely without authentication, it poses a high risk of unauthorized access and control over the application environment.
How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:
I don't know
How can this vulnerability be detected on my network or system? Can you suggest some commands?
[{'type': 'paragraph', 'content': 'This vulnerability can be detected by monitoring HTTP POST requests to the endpoint /api/users/updateAvatar that include file uploads without proper validation. Specifically, look for multipart/form-data requests uploading files with suspicious extensions such as .html or .jsp, which should not normally be accepted.'}, {'type': 'paragraph', 'content': 'A proof-of-concept exploit involves sending a POST request with a malicious HTML file named "aaa.html" containing a script tag to the /api/users/updateAvatar endpoint.'}, {'type': 'paragraph', 'content': 'To detect exploitation attempts, you can use network monitoring tools or web server logs to filter requests matching this pattern.'}, {'type': 'list_item', 'content': 'Use curl to simulate or detect suspicious uploads: curl -X POST -H "Authorization: Bearer <token>" -F "[email protected]" https://<target>/api/users/updateAvatar'}, {'type': 'list_item', 'content': 'Check web server access logs for POST requests to /api/users/updateAvatar with file uploads having .html, .jsp, or other executable script extensions.'}, {'type': 'list_item', 'content': 'Use intrusion detection systems (IDS) or web application firewalls (WAF) to alert on file uploads to this endpoint without proper validation.'}] [2]
What immediate steps should I take to mitigate this vulnerability?
Immediate mitigation steps include restricting or disabling the file upload functionality at the /api/users/updateAvatar endpoint until a proper fix is available.
Implement strict validation on uploaded files to allow only safe file types and reject files with potentially dangerous extensions such as .html, .jsp, or other executable scripts.
Monitor and block suspicious upload attempts using web application firewalls or intrusion detection systems.
If possible, replace or patch the affected component co.yixiang.utils.FileUtil to include proper file validation and sanitization before saving files.
Since no official patch or response from the project maintainers is available yet, consider isolating the affected service or applying network-level restrictions to limit exposure.