CVE-2022-27477

9.8 CRITICAL

📋 TL;DR

CVE-2022-27477 is an arbitrary file upload vulnerability in Newbee-Mall v1.0.0 that allows authenticated attackers to upload malicious files via the admin goods edit interface. This affects all deployments running the vulnerable version, potentially leading to remote code execution. Attackers must have admin access to exploit this vulnerability.

💻 Affected Systems

Products:
  • Newbee-Mall
Versions: v1.0.0
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects installations with admin access enabled. The vulnerability is in the admin panel at /admin/goods/edit.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete system compromise through remote code execution, allowing attackers to execute arbitrary commands, steal data, install malware, or pivot to other systems.

🟠

Likely Case

Webshell deployment leading to persistent backdoor access, data exfiltration, or defacement of the e-commerce platform.

🟢

If Mitigated

Limited impact with proper file upload validation, restricted admin access, and web application firewall rules blocking malicious uploads.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploitation requires admin credentials. The vulnerability is well-documented in GitHub issues with technical details.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: v1.0.1 or later

Vendor Advisory: https://github.com/newbee-ltd/newbee-mall/issues/63

Restart Required: Yes

Instructions:

1. Backup your current installation. 2. Update to Newbee-Mall v1.0.1 or later from the official GitHub repository. 3. Restart the web application server. 4. Verify the fix by testing the upload functionality.

🔧 Temporary Workarounds

Restrict Admin Access

all

Limit admin panel access to trusted IP addresses only

# Example for Apache: 
<Location /admin> 
  Order deny,allow 
  Deny from all 
  Allow from 192.168.1.0/24 
</Location>
# Example for Nginx: 
location /admin { 
  allow 192.168.1.0/24; 
  deny all; 
}

File Upload Restrictions

all

Implement web server rules to block dangerous file extensions

# Apache: 
<Location /admin/goods/edit> 
  SetEnvIf Request_URI ".*\.(php|phtml|php3|php4|php5|php7|phar|pl|py|jsp|asp|aspx|sh|bash|exe|dll|bat|cmd)$" block_upload 
  Deny from env=block_upload 
</Location>
# Nginx: 
location ~* \.(php|phtml|php3|php4|php5|php7|phar|pl|py|jsp|asp|aspx|sh|bash|exe|dll|bat|cmd)$ { 
  deny all; 
}

🧯 If You Can't Patch

  • Disable the admin goods edit functionality entirely if not required
  • Implement strict file upload validation including file type checking, size limits, and content scanning

🔍 How to Verify

Check if Vulnerable:

Check if running Newbee-Mall v1.0.0 and test file upload at /admin/goods/edit with admin credentials

Check Version:

Check package.json or version files in the Newbee-Mall installation directory

Verify Fix Applied:

Attempt to upload a file with dangerous extension (e.g., .php) to /admin/goods/edit - should be rejected

📡 Detection & Monitoring

Log Indicators:

  • Unusual file uploads to /admin/goods/edit
  • Files with executable extensions in upload directories
  • Multiple failed upload attempts

Network Indicators:

  • POST requests to /admin/goods/edit with file uploads
  • Subsequent requests to uploaded files with executable extensions

SIEM Query:

source="web_logs" AND (uri="/admin/goods/edit" AND method="POST" AND file_upload="true")

🔗 References

📤 Share & Export