/

CVE-2026-33350

Severity:

HIGH RISK

(7.5)

SQL Injection in LORIS MRI Feedback Imaging Browser

CVE-2026-33350

Analyzed

Vulnerability type

Category:

SQL Injection

CWE:

CWE-89

Impact:

Unauthorized Data Access and Modification

Severity:

HIGH RISK

(7.5)

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

A SQL injection vulnerability in the MRI feedback popup window of the LORIS imaging browser allows crafted input to be incorporated directly into database queries.

If an attacker can submit malicious data through the affected MRI feedback functionality, they may be able to access, modify, or corrupt research data stored on the LORIS server.

Affected context

This vulnerability occurs within the MRI feedback popup window in the LORIS imaging browser, where user-supplied values are used to construct SQL queries.

It becomes relevant in deployments where:

  • The LORIS web interface is exposed to internal or external users,
  • The MRI feedback feature is accessible, and
  • Input from that feature flows into database operations without sufficient parameterization or sanitization.

The database backing LORIS typically contains sensitive neuroimaging and research-related metadata, increasing the potential impact of injection flaws.

Exploit preconditions

  • Attack surface: Web-based HTTP(S) endpoints associated with the MRI feedback popup in the LORIS imaging browser.
  • Required access: Ability to interact with the affected web interface (e.g., valid LORIS user account or any role permitted to access MRI feedback features, depending on site configuration).
  • Trigger point: Submission of crafted form fields, query parameters, or other inputs that are incorporated into SQL statements for MRI feedback handling.
  • Why exploitation is possible: The application constructs SQL queries using untrusted input without consistently using parameterized statements or robust input validation, allowing attackers to inject or manipulate SQL fragments executed by the database.

Why this happens

The underlying bug aligns with CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection').

In affected LORIS code paths, user-controlled data from the MRI feedback popup is merged into SQL queries in a way that does not reliably neutralize special characters such as quotes, delimiters, or operators.

Instead of using prepared statements or a query builder that separates code from data, the logic appears to rely on string concatenation or insufficient sanitization.

This insecure pattern allows attackers to alter the intended structure of SQL commands, enabling unanticipated operations like bypassing filters, accessing unauthorized rows, or modifying stored data.

Potential impact

  • Attackers may read sensitive research or imaging-related data beyond their authorized scope.
  • Malicious users could modify or delete MRI feedback records or other related database entries.
  • Data integrity of neuroimaging studies and associated metadata can be compromised or corrupted.
  • Application behavior might be altered, including potential escalation of logical permissions via manipulated queries.
  • In certain configurations, attackers could potentially pivot to other tables within the same database instance.

General mitigation guidance

Effective mitigation focuses on eliminating direct injection opportunities and reducing the trust placed in user input:

  • Adopt parameterized queries (prepared statements) or ORM-level abstractions for all database access, especially in the MRI feedback and imaging browser code paths.
  • Avoid dynamic SQL string concatenation; where dynamic behavior is required, restrict it to whitelisted, server-controlled values.
  • Apply strict validation on all inputs reaching database operations, enforcing expected types, ranges, and formats instead of filtering known-bad characters.
  • Implement least-privilege database accounts so the web application only has the minimal permissions required for normal operation, limiting blast radius if injection occurs.
  • Centralize query construction patterns and coding guidelines so new features default to safe database access methods.

How teams detect issues like this

Organizations can look for this and similar issues using a combination of automated and manual techniques:

  • Static analysis: Configure SAST rules that flag SQL query construction using string concatenation or interpolation with user-controlled variables in PHP or other languages used by LORIS.
  • Code review: During peer review, examine MRI feedback and imaging browser modules for direct SQL strings, inline query fragments, or conditional SQL building without prepared statements.
  • Dynamic testing: Use parameter fuzzing and automated web scanners configured to test form fields and query parameters for SQL injection behavior, focusing on the MRI feedback popup workflow.
  • Runtime monitoring: Enable database and application logging to capture anomalous query patterns, such as unexpected UNIONs, comment markers, or syntax errors indicative of injection attempts.
  • Policy enforcement: Establish coding standards that require prepared statements and vet any exception via security review, optionally enforced via CI hooks or linters.

Sources

SourceLink
github.comgithub.com/aces/Loris/security/advisories/GHSA-9r29-6jgc-3ggh

Frequently asked

questions

It can be, if the LORIS web interface (and specifically the MRI feedback functionality) is accessible over a network. An attacker who can reach the affected pages and submit input may attempt SQL injection over HTTP(S).

Typically, exploitation requires the same level of access needed to reach the MRI feedback popup in the imaging browser. In many deployments, this functionality is behind authentication, so a valid user account or equivalent access is likely required, but the exact requirement depends on local configuration.

Refactor all affected queries to use prepared statements or ORM-based methods that separate SQL code from data, combined with strict input validation. Removing any direct string-based query building that incorporates user-controlled data is the most robust fix.

Standardize on parameterized database access for the entire application, enforce secure coding guidelines via code review and automated checks, and treat all user input as untrusted. Regular security testing around data entry points, especially those connected to database operations, helps catch regressions early.

Find out what's already
exploitable in your codebase.