/

CVE-2024-58387

Severity:

HIGH RISK

(7.5)

Path Traversal (CWE-22) in Inspur Haiyue HCM Cloud

CVE-2024-58387

Deferred

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Unauthorized Arbitrary File Disclosure

Severity:

HIGH RISK

(7.5)

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

Inspur Haiyue HCM Cloud contains a path traversal vulnerability in its model report file download functionality. An unauthenticated remote attacker may supply manipulated path parameters to read arbitrary files, including sensitive application and operating system data, when the endpoint is reachable.

Affected context

The vulnerability occurs in the /api/model_report/file/download endpoint when user-controlled index and ext parameters influence the file selected for download. Deployments may be at risk when this endpoint is externally reachable, does not require authentication, and fails to constrain file paths to an intended report directory.

Exploit preconditions

  • Attack surface: HTTP-accessible model report file download endpoint
  • Required access: No authentication may be required when the endpoint is exposed
  • Trigger point: Processing of attacker-controlled file path parameters during a download request
  • Why exploitation is possible: Input values are insufficiently validated or canonicalized before being used to resolve a filesystem path

Why this happens

The underlying bug is improper limitation of a path used to access local files. User-controlled path components are accepted without reliably enforcing an application-owned directory boundary, allowing traversal semantics to escape the intended storage location.

This behavior maps to CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'). The insecure pattern occurs when request parameters are treated as trusted file locations instead of being resolved against a fixed base directory and checked after canonicalization.

Potential impact

  • Attackers may read operating system files containing account or system information.
  • Attackers could disclose application configuration and database files.
  • Exposed secrets may enable follow-on access to connected services or administrative interfaces.
  • Disclosure of internal paths and configuration may support additional attacks.

General mitigation guidance

Mitigation generally focuses on removing direct trust in client-supplied filesystem paths.

Common defensive patterns include:

  • Map opaque file identifiers to server-side records rather than accepting path values from clients.
  • Resolve candidate paths against a fixed, permitted directory and verify that the canonical result remains within that directory.
  • Reject traversal syntax, absolute paths, unexpected separators, and encoded path variants as defense-in-depth controls.
  • Apply strict allowlists for permitted file names and extensions.
  • Require authentication and authorization for report downloads, using least privilege for the service account.
  • Store downloadable artifacts outside sensitive filesystem locations and limit process access to only required directories.
  • Avoid returning detailed filesystem errors or path information to clients.

How teams detect issues like this

High-level detection can combine source review, runtime monitoring, and policy enforcement:

  • Use static analysis to identify request parameters passed into file-open, download, archive, or path-joining APIs.
  • Review code for missing canonicalization, directory-boundary checks, allowlists, and authorization around file retrieval.
  • Monitor web logs for unusual path separators, encoded traversal markers, absolute-path patterns, repeated download probing, and access to unexpected file names.
  • Enforce application security policies requiring authenticated access and approved storage roots for file-download endpoints.
  • Use automated code review or security scanning tools to flag direct use of request data in filesystem operations.

Sources

SourceLink
cn-sec.comcn-sec.com/archives/3372984.html
github.comgithub.com/projectdiscovery/nuclei-templates/blob/main/http/vulnerabilities/hcm/hcm-cloud-lfi.yaml
vulncheck.comvulncheck.com/advisories/inspur-hcm-cloud-arbitrary-file-read-via-file-download-endpoint

Frequently asked

questions

It may be remotely exploitable when the affected download endpoint is reachable over the network and accepts requests without authentication.

No account may be necessary according to the described behavior. Network access to the endpoint is the primary requirement, although deployment controls can reduce exposure.

Replace client-supplied paths with server-side file identifiers, enforce an allowlisted storage root after canonicalization, and apply authentication and authorization checks.

Treat all path-related request data as untrusted, use secure file-access abstractions, restrict service privileges, and test download endpoints for traversal and authorization weaknesses.

Find out what's already
exploitable in your codebase.