/

CVE-2026-53553

Severity:

HIGH RISK

(7.7)

Path Traversal (CWE-22) in Goploy File Compare Endpoint

CVE-2026-53553

Deferred

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22, CWE-200

Impact:

Unauthorized File Access and Information Disclosure

Severity:

HIGH RISK

(7.7)

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

Goploy versions before 1.18.0 contain a path traversal vulnerability in the backend /deploy/fileDiff API, which processes client-supplied file paths without sufficient restriction.

An attacker who can reach the affected endpoint may access files outside the intended comparison directory, potentially exposing sensitive application or host data.

Affected context

The vulnerability occurs in Goploy deployments using the backend File Compare API. It becomes risky when client-controlled path values are accepted by /deploy/fileDiff and resolved without reliably constraining them to an approved base directory. The practical exposure depends on endpoint reachability, authentication controls, filesystem permissions, and the sensitivity of accessible files.

Exploit preconditions

  • Attack surface: The backend /deploy/fileDiff API endpoint
  • Required access: Network access to the endpoint and any authentication or authorization required by the deployment
  • Trigger point: Processing and resolving a client-provided file path during a file comparison request
  • Why exploitation is possible: Insufficient path validation may allow a supplied path to escape the intended directory and reference other readable filesystem locations

Why this happens

The underlying flaw is improper limitation of a user-controlled pathname before filesystem access. When an application concatenates, normalizes, or resolves client input without enforcing a trusted directory boundary, traversal sequences or equivalent path representations may direct access outside the intended location.

This maps primarily to CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'). The resulting exposure of unintended files may also relate to CWE-200: Exposure of Sensitive Information to an Unauthorized Actor.

Potential impact

  • An attacker may read files outside the intended comparison directory
  • Sensitive configuration, credentials, source code, or operational data could be disclosed
  • Exposed files could support further compromise of the deployment environment
  • Security monitoring and incident response could be hindered if sensitive system information is revealed

General mitigation guidance

Mitigation generally focuses on reducing trust in client-supplied paths and enforcing a strict filesystem boundary.

Common defensive patterns include:

  • Resolving paths against a fixed trusted base directory and verifying the final canonical path remains within that directory
  • Preferencing server-side file identifiers or approved relative paths over arbitrary client-provided paths
  • Applying allowlists for permitted files, directories, and filename formats
  • Rejecting traversal indicators, absolute paths, ambiguous encodings, and platform-specific alternate path forms
  • Restricting the service account's filesystem permissions to only the directories required for deployment operations
  • Returning minimal file comparison data and avoiding unnecessary disclosure of filesystem details
  • Enforcing authentication, authorization, and network segmentation around deployment APIs

How teams detect issues like this

Detection approaches may include:

  • Static analysis rules for filesystem APIs that consume request parameters without canonicalization and boundary checks
  • Code review checks for path concatenation, direct use of query or body values, and missing base-directory validation
  • Dynamic testing with traversal variants, encoded path representations, absolute paths, and platform-specific separators in controlled environments
  • Web application firewall or API gateway policies that flag suspicious path patterns
  • Audit logging for file comparison requests, resolved paths, authorization decisions, and unusual access outside expected deployment directories
  • Automated security review tools that identify path-handling flows from request input to filesystem operations

Sources

SourceLink
github.comgithub.com/zhenorzz/goploy/releases/tag/v1.18.0
github.comgithub.com/zhenorzz/goploy/commit/d51aa15ebc0a474d9d71d6c453a0fe798dd5e007
github.comgithub.com/zhenorzz/goploy/security/advisories/GHSA-4g5x-hcwm-82jw

Frequently asked

questions

It may be exploitable remotely when the File Compare API is network-accessible and an attacker can submit requests that reach the vulnerable path-handling logic.

The required access depends on Goploy's authentication and authorization configuration. In many deployments, valid access to the API may be necessary, while an exposed or insufficiently protected endpoint could broaden the risk.

Constrain every requested path to a trusted, canonicalized base directory, preferably using server-controlled file references and strict allowlists rather than arbitrary client paths.

Combine secure path-resolution helpers, least-privilege service accounts, authorization checks, negative security testing, and logging of filesystem access decisions.

Find out what's already
exploitable in your codebase.