/

CVE-2026-26985

Severity:

HIGH RISK

(8.1)

Path Traversal in LORIS Electrophysiology Browser

CVE-2026-26985

Analyzed

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Sensitive Data Exposure and Potential Lateral Movement via Credential Theft

Severity:

HIGH RISK

(8.1)

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

LORIS contains a path traversal vulnerability that allows certain authenticated users to read arbitrary configuration files on the server via the electrophysiology browser feature.

If those files include hard-coded credentials, an attacker who already has application access and specific permissions may be able to reuse those secrets to access the database or other backend services.

Affected context

The vulnerability exists in LORIS deployments where the electrophysiology browser module is enabled and exposed to authenticated users with the relevant permissions.

It affects systems where server-side configuration files are accessible from the same filesystem context as web-servable resources, and where those configuration files may contain hard-coded or reused credentials.

The issue becomes particularly risky when the same credentials are valid for database access, internal APIs, or other infrastructure components.

Exploit preconditions

  • Attack surface: Web interface of the electrophysiology browser within a LORIS instance.
  • Required access: Valid authenticated account with specific authorization to access the electrophysiology browser functionality.
  • Trigger point: Supplying a crafted path or filename parameter that is not properly constrained and which the backend uses to locate files.
  • Why exploitation is possible: The server-side logic accepts user-influenced path components and resolves them on the filesystem without enforcing strict directory confinement, allowing traversal outside the intended directory.

Why this happens

This vulnerability arises from insufficient validation and normalization of user-controlled path input used to access files on the server.

The electrophysiology browser uses a parameter to determine which file to read, but it does not robustly restrict the resolved path to a safe base directory or canonicalize the path before use.

As described by CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), the application allows sequences such as directory traversal tokens or equivalent constructs to influence filesystem lookups, enabling access to configuration files not meant to be downloadable through the web layer.

Potential impact

  • Reading server-side configuration files that should not be exposed to end users.
  • Disclosure of hard-coded credentials used for databases or supporting services.
  • Use of stolen credentials to authenticate to the database or other internal systems.
  • Pivoting from application access to broader infrastructure compromise if credential reuse or over-privileged accounts exist.
  • Improved reconnaissance for later attacks by learning internal paths, environment details, and deployment configuration.

General mitigation guidance

Effective mitigation focuses on strictly constraining which files can be accessed and reducing the sensitivity of any files reachable from the web tier.

Common defensive patterns include:

  • Enforcing whitelists of allowed files or identifiers rather than accepting raw paths from user input.
  • Resolving user-supplied path components against a canonical base directory and rejecting any request that escapes that directory.
  • Centralizing file-access helpers that perform consistent normalization, path checking, and permission enforcement.
  • Storing secrets in dedicated secret-management systems or environment variables rather than in general-purpose configuration files accessible to the web process.
  • Segregating configuration and secret files into directories that are not readable by the web application where possible, or granting the web layer only the minimal filesystem permissions needed.
  • Using defense-in-depth access controls such as separate database accounts for different components and avoiding credential reuse across services.

How teams detect issues like this

Path traversal issues can often be uncovered both statically and dynamically:

  • Static analysis: Scan code for file operations that use user-controlled data in functions such as file open/read without robust path normalization or directory checks. Flag uses of raw request parameters or query strings passed into filesystem APIs.
  • Code review: Look for modules that allow browsing or downloading files, particularly where UI controls map directly to filesystem paths. Verify that all such access goes through a single, well-reviewed access layer enforcing directory constraints.
  • Dynamic testing: Use security testing tools or manual tests to send crafted traversal patterns (e.g., "../") via file or path parameters and confirm that the application does not return configuration or other unexpected files.
  • Policy and CI checks: Incorporate secure coding guidelines for file handling and enforce them via pre-merge checks, including automated linters or SAST tools that recognize path traversal patterns.

Sources

SourceLink
github.comgithub.com/aces/Loris/releases/tag/v26.0.5
github.comgithub.com/aces/Loris/releases/tag/v27.0.2
github.comgithub.com/aces/Loris/security/advisories/GHSA-g3pp-rqvq-xxhp

Frequently asked

questions

Yes, but only through the authenticated web interface. An attacker must reach the LORIS application over the network and have a valid account with the relevant electrophysiology browser permissions to exploit the path traversal.

The attacker must be an authenticated user and must hold the specific authorization that allows access to the electrophysiology browser feature. Anonymous or unprivileged users cannot exploit the issue directly.

The most robust fix is to avoid using arbitrary paths derived from user input. Instead, map user selections to a predefined set of identifiers or filenames, validate them against a whitelist, and ensure all file access is constrained to a dedicated, known-safe directory. Additionally, ensure sensitive configuration and secrets are stored outside any directories reachable by such features.

Embed strict file-access patterns into the codebase and review process: never trust user-supplied path segments, implement centralized helpers that enforce directory confinement and canonicalization, separate secret storage from web-readable paths, and regularly run static and dynamic security tests focused on file handling and configuration exposure.

Find out what's already
exploitable in your codebase.