/

CVE-2023-54405

Severity:

CRITICAL RISK

(9.8)

Unrestricted File Upload (CWE-434) in H3C CVM Endpoint

CVE-2023-54405

Deferred

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

H3C CVM contains an unauthenticated arbitrary file upload vulnerability in its file upload endpoint. An attacker may use path traversal in the caller-supplied token parameter to place a server-side script in a web-accessible location, potentially resulting in remote code execution as the web-server user.

Affected context

The issue occurs in H3C CVM deployments where the /cas/fileUpload/upload endpoint is reachable and does not require authentication. Risk is increased when the endpoint accepts caller-controlled path information, does not constrain uploaded file types, and stores files in directories that the web server can access or execute.

Exploit preconditions

  • Attack surface: The H3C CVM file upload endpoint
  • Required access: Network access to the endpoint; authentication may not be required
  • Trigger point: Processing an upload request containing a manipulated token value
  • Why exploitation is possible: The endpoint may use caller-controlled path information without effective traversal protection or file-type restrictions, allowing uploaded content to reach a web-accessible location

Why this happens

The vulnerability results from treating upload metadata and destination paths supplied by the caller as trustworthy. Insufficient path canonicalization, destination validation, and file-type enforcement can allow an attacker to store executable server-side content outside the intended upload directory. This behavior maps to CWE-434: Unrestricted Upload of File with Dangerous Type.

Potential impact

  • An attacker may execute arbitrary code with the privileges of the web-server process
  • The application or underlying host could be compromised
  • Sensitive cloud-management data may be accessed or altered
  • The attacker could use the compromised service for lateral movement
  • Cloud workloads or management operations may be disrupted

General mitigation guidance

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

Common defensive patterns include:

  • Allowing only narrowly defined file types based on server-side content validation
  • Generating server-side filenames and ignoring caller-supplied paths or names
  • Canonicalizing paths and enforcing containment within a dedicated upload directory
  • Storing uploads outside web roots or serving them through a non-executable content path
  • Applying explicit size, extension, MIME, and content-signature limits
  • Requiring authentication and authorization for administrative upload functions
  • Running web services with least privilege and restricting write permissions
  • Separating uploaded content from sensitive application and management data

How teams detect issues like this

High-level detection approaches include:

  • Static analysis for upload handlers that concatenate user input into filesystem paths
  • Code review checks for missing canonicalization, allowlists, or server-generated filenames
  • Monitoring upload requests for traversal indicators, unexpected extensions, and writes outside approved directories
  • Reviewing web-server logs for requests to newly created or uploaded server-side files
  • Enforcing policy rules that prevent executable content from being stored under web-accessible paths
  • Using automated security review tools to identify unrestricted upload patterns

Sources

SourceLink
blog.csdn.netblog.csdn.net/qq_41904294/article/details/134697278
github.comgithub.com/projectdiscovery/nuclei-templates/blob/main/http/vulnerabilities/other/h3c-cvm-arbitrary-file-upload.yaml
h3c.comh3c.com/en/Support/Resource_Center/EN/Cloud_Computing/Catalog/H3C_CAS/H3C_CAS/Technical_Documents/Configure___Deploy/User_Manuals/H3C_CAS_CVM_UG_E0785-21554/?CHID=1087104
vulncheck.comvulncheck.com/advisories/h3c-cvm-unauthenticated-file-upload-via-fileupload-upload-token

Frequently asked

questions

Yes. The described endpoint can be reachable over the network, and exploitation may not require authentication when deployment exposure permits access.

The key requirement is network access to the vulnerable upload endpoint. The endpoint's unauthenticated behavior can make the attack surface broader than an authenticated administrative function.

Treat uploaded files as untrusted data: generate destination names server-side, enforce directory containment, validate content with strict allowlists, and prevent execution from upload locations.

Apply centralized upload-handling policies, require authorization, store files outside executable web roots, use least-privilege service accounts, and monitor both upload activity and access to newly created files.

Find out what's already
exploitable in your codebase.