/

CVE-2026-35169

Severity:

HIGH RISK

(8.7)

Cross-Site Scripting and Insecure Direct Object Access

CVE-2026-35169

Analyzed

Vulnerability type

Category:

Cross-Site Scripting and Insecure Direct Object Access

CWE:

CWE-79, CWE-552

Impact:

Reflected XSS and Unauthorized File Access

Severity:

HIGH RISK

(8.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

The LORIS help_editor module fails to properly sanitize certain user-supplied variables, enabling reflected cross-site scripting (XSS) when a victim is lured into clicking a crafted link.

The same input path can also be abused to download arbitrary markdown files from the server, potentially exposing sensitive documentation or configuration details.

Affected context

This vulnerability affects LORIS (Longitudinal Online Research and Imaging System) deployments using the help_editor module in versions prior to 27.0.3 and 28.0.1.

It manifests in HTTP request handling where query or path parameters from user-controlled URLs are echoed back into the help editor response without sufficient output encoding or validation.

Additionally, the same request handling logic allows user input to influence which markdown files are served, without adequately constraining paths to an allowed set.

Exploit preconditions

  • Attack surface: Public or internal web interface of LORIS, specifically endpoints related to the help_editor module.
  • Required access: Ability to send crafted URLs to LORIS users (e.g., via email, chat, or other messaging), and for file download, network access to the LORIS web application.
  • User interaction: For reflected XSS, a victim must be tricked into opening a crafted URL in a browser where they are authenticated to LORIS (or have access to sensitive data).
  • Trigger point: The help_editor endpoint processes user-controlled parameters and directly reflects them into HTML output and file selection logic.
  • Why exploitation is possible: User input is neither consistently output-encoded for the browser context (CWE-79) nor restricted to a safe, predefined set of markdown files (CWE-552), allowing both script injection and unauthorized file retrieval.

Why this happens

The core issue is insufficient validation and encoding of user input in the help_editor module.

For the XSS component (CWE-79), application logic incorporates user-supplied values into HTML responses without applying context-appropriate output encoding, allowing injected script content to execute in the victim's browser.

For the arbitrary markdown download (CWE-552), the server-side logic trusts user input to select files, without robust whitelist checks or path constraints, exposing files that should not be directly accessible from the web.

Conceptually, this reflects a broader pattern where untrusted request parameters directly influence both rendered HTML and backend resource selection without proper boundary enforcement.

Potential impact

  • Execution of arbitrary JavaScript in the context of the LORIS application for affected users (reflected XSS).
  • Theft of user session data or impersonation of logged-in users via malicious scripts.
  • Unauthorized reading of markdown files that may contain sensitive documentation, internal procedures, or hints about system configuration.
  • Facilitation of further attacks, such as phishing within the application UI or reconnaissance using exposed file contents.
  • Potential escalation of privileges or lateral movement if exposed data includes operational or security-related information.

General mitigation guidance

Effective mitigation focuses on strict separation of data and code, and on limiting what files can be served through web endpoints:

  • Apply context-aware output encoding to all user-controlled data rendered into HTML, attributes, or scripts, ensuring that embedded content cannot break out of its intended context.
  • Validate and canonicalize all file selection parameters, enforcing a strict whitelist of allowed markdown files or directories rather than trusting arbitrary user-provided paths.
  • Implement centralized helper APIs for rendering templates and serving files, so that sanitization, encoding, and path checks are consistently applied across modules.
  • Reduce privileges of the web process and restrict its accessible filesystem paths to only what is necessary for operation, limiting the impact of any file exposure issue.
  • Treat all URL parameters and query strings as untrusted input, regardless of UI origin, and avoid reflecting them directly in responses without processing.

How teams detect issues like this

Several complementary strategies can help detect this class of issues:

  • Use static analysis or linters to flag direct insertion of request parameters into templates, HTML, or JavaScript without passing through standard encoding/escaping helpers.
  • Enforce code review checklists that explicitly require reviewers to verify output encoding for any new or modified view templates and to check file-serving logic for whitelist-based validation.
  • Add automated tests and security scans (including dynamic application security testing) that probe help_editor endpoints with typical XSS payloads and path-manipulation inputs to identify unsafe reflections and file access.
  • Configure web application firewalls (WAFs) or reverse proxies with rules to detect and alert on common XSS patterns or suspicious file access attempts targeting documentation paths.

Sources

SourceLink
github.comgithub.com/aces/Loris/security/advisories/GHSA-j2p3-58m2-v6q3

Frequently asked

questions

Yes. An attacker can exploit it remotely by sending crafted URLs to users who can access the LORIS application. If a victim follows the link in a browser, the reflected XSS payload can run, and the file download path can be triggered without additional local access.

The ability to send a link does not require authentication, but the impact depends on the victim's session. If the victim is authenticated to LORIS, the attacker's script executes with that user's privileges. For file downloads, network access to the LORIS web interface is required; exposure severity may increase if the instance is internet-accessible.

The strongest pattern is to enforce strict output encoding for all user-supplied data in templates, combined with centralized, whitelist-based file-serving APIs that control which resources can be accessed. Avoid direct use of raw request parameters in HTML or file path construction.

Adopt a secure development lifecycle that includes standardized encoding libraries, input validation frameworks, and mandatory security-focused code reviews. Augment this with automated static analysis for XSS/file access patterns and regular security testing to catch unsafe reflections and resource exposures before release.

Find out what's already
exploitable in your codebase.