Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate as low-privilege report viewer
-
ExploitOpen SQL report using %%FILTER_VAR%%
-
ExecutionInject UNION SELECT via filter_var parameter
-
ImpactExfiltrate arbitrary tables and password hashes
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Parameterized queries, prepared statements
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Persistence The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Requires an authenticated low-privileged Moodle user (PR:L) who has been granted permission to view a Configurable Reports SQL-type report whose query embeds the %%FILTER_VAR%% placeholder - this is the exact precondition reflected by AT:P in the CVSS 4.0 vector. The vulnerable path is report_sql::prepare_sql() reached via the filter_var request parameter of viewreport.php. Exploitation is LIMITED by: (1) authentication is mandatory; (2) a report must have been authored using %%FILTER_VAR%% and shared with the attacker, which is not the default state of a fresh install; and (3) versions before 5.3.1 only. No end-user interaction is needed (UI:N), and impact is confined to reading data (confidentiality), not modifying it. |
| Impact | This is a genuine but moderate-priority issue, best characterized as an authenticated confidentiality-disclosure flaw rather than a drive-by critical. The CVSS 4.0 vector (AV:N/AC:L/AT:P/PR:L/UI:N/VC:H) is internally consistent with the description: exploitation is network-reachable and low-complexity, but requires low privileges (PR:L - an authenticated Moodle account) and carries an attack requirement (AT:P) because a report using the %%FILTER_VAR%% placeholder must exist and be viewable by the attacker. Impact is confidentiality-only (VC:H, VI:N, VA:N), matching a read-oriented SQLi that can extract arbitrary tables including password hashes. No EPSS score, KEV listing, or public exploit was provided in the input, so there is no signal of active or widespread exploitation - the base score of 6.0 (Medium) is driven by the high confidentiality impact being gated behind privileges and a configuration precondition. The source-code diff from VulnCheck confirms the root cause and fix, which raises confidence that the vulnerability is real and well-understood, but absent POC/KEV/EPSS data this should be treated as a timely patch-soon item (credential-hash exposure is serious) rather than an emergency. One nuance to verify: the description says 'read arbitrary database tables,' which in Moodle means the entire shared application database - defenders should assume full-DB read, not just report-scoped data. |
| Exploit ScenarioDerived | An attacker with a legitimate low-privilege Moodle account that is permitted to view a Configurable Reports SQL report containing the %%FILTER_VAR%% placeholder supplies a crafted filter_var parameter to viewreport.php. Because the left-hand side of the filter clause was interpolated into the SQL string, the attacker breaks out with a UNION SELECT or subquery to dump the mdl_user table and extract stored password hashes. No public exploit was identified at time of analysis, though the VulnCheck advisory and patch diff disclose the vulnerable regex and injection points in detail. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 20, 2026
SQL injection in the Configurable Reports block for Moodle (moodle-block_configurablereports) before 5.3.1 allows an authenticated low-privileged user to read arbitrary database tables - including Moodle user password hashes - through the filter_var request parameter of viewreport.php. Exploitation requires that the attacker hold the capability to view a SQL-type report that was authored with the %%FILTER_VAR%% placeholder, which is why the vector carries AT:P and PR:L; impact is limited to confidentiality (C:H with I:N/A:N) and no user interaction is needed. A vendor patch is available in release 5.3.1, and no public exploit code was identified at time of analysis.
RemediationAI
Vendor-released patch: upgrade the Configurable Reports block to version 5.3.1 (release tag https://github.com/jleyva/moodle-block_configurablereports/releases/tag/5.3.1), which incorporates commits 1a9fea4b98b093912c6432ea3705c7b1eff4efc0 and 8696899740577559efa274b7a40f3bb4f2b30f32 and hardens report_sql::prepare_sql() so the left-hand side of a %%FILTER_VAR%% clause must be a plain column identifier, optionally wrapped in LOWER/UPPER/TRIM/LENGTH, with the value always bound as a parameter. If upgrading cannot be done immediately, audit every SQL-type report on the site and remove or rewrite any that use the %%FILTER_VAR%% placeholder in a way that places attacker-controlled text in the column position (replacing it with fixed values or a report-specific form field would preserve functionality at the cost of flexibility), and restrict the capability to view these reports to trusted roles such as managers or site administrators - noting that this narrows the pilot population but does not remove the flaw for those roles. Review database logs for anomalous UNION SELECT or subquery activity against {user} tables originating from viewreport.php as a compensating detective control, and treat any password hashes stored in the Moodle instance as potentially exposed until the patch is applied.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The block's SQL report type lets an administrator embed the %%FILTER_VAR%% placeholder in a report query, which report_sql::prepare_sql() expands at runtime from the filter_var request parameter. Prior to 5.3.1 the parser split the user-supplied string into a 'clause' portion, an operator, and a value: only the value was bound as a parameter, while the left-hand 'clause' text was concatenated directly into the SQL statement. Because the clause portion was only matched by a loose regular expression (anything following AND/OR up to a recognised operator), an attacker could substitute subqueries or UNION SELECT constructs in the column position and read from tables the report author never intended to expose. The fix in commit 1a9fea4 tightly constrains the left side to a plain column identifier such as 'id' or 'u.city', optionally wrapped in one whitelisted function (LOWER, UPPER, TRIM, LENGTH), and always binds the comparison value; the accompanying tests in tests/sql_filter_var_test.php assert that payloads like "AND username = admin' OR '1'='1" are treated as literal values and that non-column left-hand expressions are dropped. This is a classic CWE-89 improper neutralisation of special elements in SQL commands, rooted in the unsafe assumption that the structural part of a dynamically assembled WHERE fragment can be treated as trusted input.
Know when Moodle gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
Authenticated low-priv user (PR:L) injects over the network (AV:N) with no user interaction; reads arbitrary tables (C:H) without integrity/availability impact and no scope change.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
DescriptionCVE.org
Configurable Reports block for Moodle (moodle-block_configurablereports) before 5.3.1 contains an sql injection vulnerability in report_sql::prepare_sql() via the filter_var request parameter of viewreport.php. Low-privileged users permitted to view reports using the %%FILTER_VAR%% placeholder can inject subqueries or UNION SELECT to read arbitrary database tables, including user password hashes.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
SQL injection exploits the way applications construct database queries by mixing user input directly into SQL statements.
Moodle through 2.5.2 allows remote authenticated administrators to execute arbitrary programs by configuring the aspell
A command execution vulnerability exists in the default legacy spellchecker plugin in Moodle 3.10. Rated critical severi
A flaw was found in Moodle. Rated high severity (CVSS 8.1), this vulnerability is remotely exploitable, no authenticatio
In Moodle 2.x and 3.x, SQL injection can occur via user preferences. Rated critical severity (CVSS 9.8), this vulnerabil
The Moodle LMS Jmol plugin version 6.1 and earlier contains a path traversal vulnerability in jsmol.php. The query param
Multiple cross-site scripting (XSS) vulnerabilities in Moodle through 2.2.11, 2.3.x before 2.3.9, 2.4.x before 2.4.6, an
Unrestricted file upload vulnerability in the double extension support in the "image" module in Moodle 3.1.2 allows remo
Unrestricted file upload vulnerability in the "legacy course files" and "file manager" modules in Moodle 3.1.2 allows re
moodle before versions 3.5.2, 3.4.5, 3.3.8, 3.1.14 is vulnerable to an XML import of ddwtos could lead to intentional re
An issue was discovered in Moodle 3.x. Rated high severity (CVSS 8.8), this vulnerability is remotely exploitable, low a
Moodle 3.1.2 allows remote attackers to obtain sensitive information via unspecified vectors, related to a "SQL Injectio
Moodle 3.10.3 contains a persistent cross-site scripting vulnerability in the calendar event subtitle field that allows
EUVD-2026-105086
GHSA-7qwj-4vq5-8c2j
NVD
CVE.org
EPSS
Exploit-DB