Summary
Xerte Online Toolkits up to version 3.15 contains a relative path traversal vulnerability in the elFinder connector rename functionality, where the name parameter is not sanitized for traversal sequences.
An attacker can abuse this to move files from project media directories to arbitrary locations on the server filesystem, which may lead to file overwrite, stored cross-site scripting, or even unauthenticated remote code execution when combined with other weaknesses.
Affected context
The vulnerability occurs in Xerte Online Toolkits deployments that expose the elFinder file manager connector at /editor/elfinder/php/connector.php.
It affects environments where project media files are managed through elFinder and the rename command is available, allowing the name parameter to influence the target location of files.
The risk is higher on systems where project media files can include active content (e.g., HTML, JavaScript, or PHP files) and where filesystem permissions allow the web server process to write into application or web-accessible directories.
Exploit preconditions
- Attack surface: HTTP(S) requests to the elFinder connector endpoint at
/editor/elfinder/php/connector.php. - Required access: Ability to invoke the elFinder
renamecommand; in some deployments this may be unauthenticated or weakly protected, while in others it may require user-level access. - Trigger point: Sending a crafted rename request where the
nameparameter contains relative path traversal sequences (e.g.,../) to move a file outside its intended project media directory. - Why exploitation is possible: The server-side logic trusts the
nameparameter and fails to normalize and validate it against an allowed base directory, so path traversal sequences are interpreted by the underlying filesystem, enabling writes to unintended locations.
Why this happens
This issue stems from insufficient validation and canonicalization of user-controlled path components before filesystem operations.
In the affected elFinder connector implementation, the name parameter for rename operations is accepted and used to construct destination file paths without stripping, rejecting, or safely resolving directory traversal sequences.
This maps to CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the application intends to restrict access to a specific media directory but instead permits user input to escape that boundary and target arbitrary filesystem locations.
Potential impact
- Overwriting existing application files within the webroot or application directories.
- Moving user-controlled files into web-accessible locations, enabling stored cross-site scripting in project or shared content.
- Facilitating unauthenticated or low-privilege remote code execution when attackers can move PHP or other executable scripts into the application root or other executed directories.
- Tampering with configuration or resource files, potentially causing application instability, data loss, or further privilege escalation.
- Assisting in chaining attacks with other vulnerabilities (e.g., file upload flaws) to gain full server compromise.
General mitigation guidance
Effective mitigation focuses on enforcing strict directory boundaries and reducing trust in user-controlled path data.
General defensive patterns include:
- Performing canonicalization of all filesystem paths constructed from user input and verifying that the resolved path remains within a defined base directory.
- Rejecting or normalizing any
nameor similar parameters that contain.., path separators, or other traversal-related tokens, rather than passing them directly to filesystem APIs. - Using high-level file management APIs that operate on logical identifiers (e.g., file IDs or opaque handles) instead of raw paths for operations like rename or move.
- Applying least-privilege to the web server and application processes so they cannot write to application core or configuration directories, even if path traversal logic fails.
- Separating writable media directories from executable code directories, and disabling script execution in upload/media locations via server configuration.
How teams detect issues like this
Detection can combine static analysis, code review, and runtime monitoring:
- Static analysis: Configure rules to flag any concatenation of user-controlled data (such as request parameters) into filesystem paths passed to functions like
rename,move_uploaded_file, or similar without prior normalization and boundary checks. - Code review: Look for elFinder or custom file manager integrations where rename/move operations accept a
name,path, ortargetparameter and directly use it in filesystem operations; verify the presence of canonicalization and base-path enforcement. - Policy enforcement: Establish secure coding guidelines requiring path validation helpers, and enforce their use through linters or pre-commit hooks in file-management modules.
- Runtime monitoring: Inspect server logs and WAF telemetry for suspicious requests to the elFinder connector containing
../or other traversal patterns in parameters, and alert on repeated or anomalous rename/move operations.

