Summary
Etherpad's pre-authentication static asset handler can mishandle encoded path separators, allowing path traversal on POSIX systems. A remote attacker without credentials may be able to read files accessible to the Etherpad process; exposed secrets could then enable further compromise.
Affected context
The issue affects Etherpad deployments using the vulnerable static plugin asset handling path. The handler converts backslashes to forward slashes after pathname sanitization, so POSIX path checks may not detect the resulting traversal components. The path is reachable before authentication through the static asset route and the core pseudo-plugin.
Exploit preconditions
- Attack surface: Etherpad's pre-authentication
/static/*plugin asset handler - Required access: No credentials are required to reach the handler
- Trigger point: A request for a plugin asset whose path is processed by the handler
- Why exploitation is possible: Backslash-to-forward-slash conversion occurs after POSIX path checks, creating traversal components without subsequent validation or containment checks
- Access boundary: Files must be readable by the Etherpad process to be exposed
Why this happens
The underlying bug is a mismatch between path validation and path normalization. On POSIX systems, backslashes are ordinary filename bytes during the sanitizer's checks, but a later conversion turns them into path separators. Because the transformed path is not revalidated or constrained to the intended asset directory, it can escape that directory. This is a path traversal flaw (CWE-22); disclosure of readable files relates to CWE-200, while the pre-authentication exposure reflects missing authentication for the affected resource (CWE-306).
Potential impact
- An unauthenticated attacker may read files available to the Etherpad process.
- Configuration files or environment-related data could disclose credentials or other secrets.
- Disclosed administrator credentials could enable access to administrative functionality.
- An attacker with subsequent administrative access could potentially achieve in-process code execution and broader server compromise.
General mitigation guidance
Defensive patterns focus on keeping validation and filesystem access consistent:
- Normalize paths using platform-appropriate rules before validating them.
- Enforce canonical-path containment within the intended asset directory immediately before file access.
- Reject ambiguous or alternate path separators, and avoid transformations that change path meaning after validation.
- Require authentication and authorization for sensitive resources where feasible.
- Limit the files and secrets available to the application process, and apply least-privilege runtime permissions.
How teams detect issues like this
- Use static analysis to identify path sanitization followed by separator conversion or other path-changing transformations.
- Review file-serving code for canonicalization, containment checks, and validation performed before the final filesystem access.
- Add tests for alternate separators and encoded path components across supported operating systems.
- Apply policy checks requiring file access paths to remain within explicitly defined asset roots.
- Review access logs for unusual requests to static asset routes and investigate unexpected file-read errors or disclosures.

