Severity:

CRITICAL RISK

(9.8)

Unrestricted File Upload (CWE-434) in Weaver E-cology

CVE-2022-4995

Received

Vulnerability type

Category:

Unrestricted File Upload

CWE:

CWE-434

Impact:

Remote Code Execution

Severity:

CRITICAL RISK

(9.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Weaver (Fanwei) E-cology 9.0 versions before the vendor's remediation contain an unrestricted file upload vulnerability in a workflow-related upload endpoint. A remote unauthenticated attacker may upload executable server-side files, potentially leading to remote code execution with the privileges of the application server.

Affected context

The vulnerability occurs in deployments that expose the affected E-cology upload functionality and accept multipart form submissions without sufficiently restricting file type, content, destination, or execution behavior. Risk is higher when uploaded files are stored in a web-accessible location where the application server can interpret them as executable content.

Exploit preconditions

  • Attack surface: A remotely reachable E-cology file upload endpoint
  • Required access: No authentication may be required
  • Trigger point: Processing of a multipart/form-data upload request
  • Why exploitation is possible: The upload workflow may accept attacker-controlled files and place them where the application server can execute server-side content

Why this happens

The underlying issue is insufficient validation and containment of uploaded files. An upload handler that relies on client-supplied names or extensions, lacks robust content verification, or stores files within an executable web path can allow attacker-controlled server-side code to be processed.

This behavior maps to CWE-434: Unrestricted Upload of File with Dangerous Type, in which an application permits a file type or destination that can create executable behavior rather than treating uploaded content as inert data.

Potential impact

  • An attacker may execute arbitrary code under the application server account
  • Confidential business data could be accessed or modified
  • The application may be used to alter workflows or deploy persistent malicious content
  • The host could be used for lateral movement or further compromise
  • Service availability could be disrupted through malicious file placement

General mitigation guidance

Mitigation generally focuses on making uploads non-executable and reducing trust in all client-controlled file attributes.

Common defensive patterns include:

  • Allowing only narrowly defined file types based on validated content and business need
  • Using server-generated filenames and rejecting attacker-controlled paths or extensions
  • Storing uploads outside web-accessible and executable directories
  • Disabling server-side execution for upload locations
  • Applying size, quantity, and content limits
  • Enforcing authentication and authorization for upload operations where feasible
  • Running the application with the least privileges needed to process files
  • Monitoring and reviewing uploaded content and access patterns

How teams detect issues like this

Detection approaches may include:

  • Static analysis for upload handlers that trust filenames, MIME types, or client-supplied paths
  • Code review checks for executable upload destinations and missing content validation
  • Web application firewall policies for anomalous multipart uploads and unexpected file types
  • Monitoring for newly created server-side script files in upload directories
  • Access-log review for unauthenticated requests to upload functionality
  • Dynamic testing that verifies uploaded content cannot be interpreted as executable code

Automated code review and software composition tools may help identify insecure upload patterns during development.

Sources

SourceLink
ch0x01e.github.ioch0x01e.github.io/post/ecology9-wen-jian-shang-chuan-fen-xi/
cn-sec.comcn-sec.com/archives/1208148.html
github.comgithub.com/gmh5225/CVE-2022-HW-POC/blob/main/%E6%B3%9B%E5%BE%AEOA%20uploaderOperate.jsp%20%E6%96%87%E4%BB%B6%E4%B8%8A%E4%BC%A0.md
vulncheck.comvulncheck.com/advisories/weaver-e-cology-file-upload-rce-via-uploaderoperate-jsp
weaver.com.cnweaver.com.cn/cs/ecology_full_log_en.html
weaver.com.cnweaver.com.cn/cs/securityDownload.html#

Frequently asked

questions

Yes. The described attack surface is remotely reachable, and exploitation may not require authentication when the affected upload functionality is exposed.

The attacker generally needs network access to the vulnerable endpoint. No valid account may be necessary, depending on deployment configuration and endpoint exposure.

Treat uploaded files as untrusted data, allow only required content types, store them outside executable web paths, and prevent server-side interpretation in upload locations.

Combine strict upload validation with authorization controls, least-privilege application permissions, secure storage isolation, monitoring, and tests confirming that uploaded content cannot execute.

Find out what's already
exploitable in your codebase.