/

CVE-2021-48013

Severity:

HIGH RISK

(7.5)

Path Traversal (CWE-22) in Weaver E-cology 8.0 File Download

CVE-2021-48013

Deferred

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Arbitrary File Read and Information 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

Weaver E-cology 8.0 contains a path traversal vulnerability in the FileDownload endpoint that may allow unauthenticated attackers to read arbitrary files from the server.

The issue becomes risky when user-controlled file path input is accepted without adequately restricting it to an intended directory or validating resolved paths.

Weaver E-cology 8.0 contains a path traversal vulnerability in the FileDownload endpoint that may allow unauthenticated attackers to read arbitrary files from the server.

The issue becomes risky when user-controlled file path input is accepted without adequately restricting it to an intended directory or validating resolved paths.

Affected context

The vulnerability occurs in deployments exposing the /weaver/ln.FileDownload endpoint when the fpath parameter influences which server-side file is returned.

Risk is increased when the endpoint is accessible without authentication and file paths are not constrained to an approved storage location. Sensitive application configuration files, including deployment descriptors, may be exposed.

The vulnerability occurs in deployments exposing the /weaver/ln.FileDownload endpoint when the fpath parameter influences which server-side file is returned.

Risk is increased when the endpoint is accessible without authentication and file paths are not constrained to an approved storage location. Sensitive application configuration files, including deployment descriptors, may be exposed.

Exploit preconditions

  • Attack surface: The HTTP FileDownload endpoint
  • Required access: Network access to the endpoint; authentication may not be required
  • Trigger point: Processing of the user-controlled fpath parameter
  • Why exploitation is possible: The application may resolve attacker-influenced paths without sufficiently preventing traversal outside the intended download directory
  • Attack surface: The HTTP FileDownload endpoint
  • Required access: Network access to the endpoint; authentication may not be required
  • Trigger point: Processing of the user-controlled fpath parameter
  • Why exploitation is possible: The application may resolve attacker-influenced paths without sufficiently preventing traversal outside the intended download directory

Why this happens

The underlying bug is insufficient validation and canonicalization of a user-supplied file path.

When an application uses externally controlled path components to access files without enforcing a trusted base directory, traversal notation can cause resolution outside the permitted location.

This maps to CWE-22: Improper Limitation of a Pathname to a Restricted Directory, commonly known as path traversal.

The underlying bug is insufficient validation and canonicalization of a user-supplied file path.

When an application uses externally controlled path components to access files without enforcing a trusted base directory, traversal notation can cause resolution outside the permitted location.

This maps to CWE-22: Improper Limitation of a Pathname to a Restricted Directory, commonly known as path traversal.

Potential impact

  • Attackers may read arbitrary files accessible to the application process
  • Sensitive configuration, deployment, or credential material could be disclosed
  • Exposed files could support further compromise of the application or host
  • Information leakage could aid reconnaissance and lateral movement
  • Attackers may read arbitrary files accessible to the application process
  • Sensitive configuration, deployment, or credential material could be disclosed
  • Exposed files could support further compromise of the application or host
  • Information leakage could aid reconnaissance and lateral movement

General mitigation guidance

Mitigation typically focuses on eliminating direct trust in client-supplied file paths.

Common defensive patterns include:

  • Resolve requested files against a fixed, trusted storage directory and verify that the canonical result remains within that directory
  • Prefer opaque file identifiers or server-managed mappings instead of accepting filesystem paths
  • Apply strict allowlists for permitted filenames and file types
  • Reject traversal syntax, encoded path separators, and unexpected path representations as a defense-in-depth measure
  • Run the application with the least filesystem privileges necessary
  • Avoid storing secrets and sensitive configuration files in web-accessible locations

Mitigation typically focuses on eliminating direct trust in client-supplied file paths.

Common defensive patterns include:

  • Resolve requested files against a fixed, trusted storage directory and verify that the canonical result remains within that directory
  • Prefer opaque file identifiers or server-managed mappings instead of accepting filesystem paths
  • Apply strict allowlists for permitted filenames and file types
  • Reject traversal syntax, encoded path separators, and unexpected path representations as a defense-in-depth measure
  • Run the application with the least filesystem privileges necessary
  • Avoid storing secrets and sensitive configuration files in web-accessible locations

How teams detect issues like this

Organizations commonly detect path traversal risks through:

  • Static analysis for filesystem APIs receiving request parameters or other untrusted input
  • Code review checks for missing canonicalization and trusted-directory boundary validation
  • Dynamic testing of file download functionality with normalized, encoded, and alternate path representations
  • Web application firewall or gateway policies that monitor suspicious path parameters
  • Access-log review for unusual file download requests and repeated failures

Automated security testing and code review tools can help identify these patterns during development.

Organizations commonly detect path traversal risks through:

  • Static analysis for filesystem APIs receiving request parameters or other untrusted input
  • Code review checks for missing canonicalization and trusted-directory boundary validation
  • Dynamic testing of file download functionality with normalized, encoded, and alternate path representations
  • Web application firewall or gateway policies that monitor suspicious path parameters
  • Access-log review for unusual file download requests and repeated failures

Automated security testing and code review tools can help identify these patterns during development.

Sources

SourceLink
github.comgithub.com/PeiQi0/PeiQi-WIKI-Book/blob/main/docs/wiki/oa/%E6%B3%9B%E5%BE%AEOA/%E6%B3%9B%E5%BE%AEOA%20E-Weaver%20ln.FileDownload%20%E4%BB%BB%E6%84%8F%E6%96%87%E4%BB%B6%E8%AF%BB%E5%8F%96%E6%BC%8F%E6%B4%9E.md
github.comgithub.com/projectdiscovery/nuclei-templates/blob/main/http/vulnerabilities/weaver/ecology/ecology-filedownload-directory-traversal.yaml
vulncheck.comvulncheck.com/advisories/weaver-e-cology-8.0-unauthenticated-path-traversal-via-ln-filedownload

Frequently asked

questions

Yes. It may be remotely exploitable when the FileDownload endpoint is network-accessible and accepts requests without requiring authentication.

The attacker generally needs network access to the endpoint. If authentication is not enforced, no valid account may be necessary.

Avoid accepting raw filesystem paths. Use server-side file identifiers, enforce an allowlist, and verify that resolved files remain within a dedicated download directory.

Apply centralized path validation, minimize filesystem permissions, keep sensitive files outside downloadable locations, and test file-handling endpoints for traversal conditions.

Yes. It may be remotely exploitable when the FileDownload endpoint is network-accessible and accepts requests without requiring authentication.

The attacker generally needs network access to the endpoint. If authentication is not enforced, no valid account may be necessary.

Avoid accepting raw filesystem paths. Use server-side file identifiers, enforce an allowlist, and verify that resolved files remain within a dedicated download directory.

Apply centralized path validation, minimize filesystem permissions, keep sensitive files outside downloadable locations, and test file-handling endpoints for traversal conditions.

Find out what's already
exploitable in your codebase.