Configurable Reports: three security releases in three weeks, explained

Moodle HQ flagged a critical fix in Configurable Reports on 10 November 2026. What changed in 5.3.1, 5.3.2 and 5.3.3, which reports break, and what to check on your site.

Drawing of a person at a desk sorting paper reports into a blue tray, while a second person fits a new lock on the filing cabinet behind them.

Short answer: if your Moodle site has the Configurable Reports block, update it to 5.3.3 (released 10 November 2026) now, then check your custom SQL reports, because some of them will stop running on purpose. On 10 November Moodle HQ posted a security notice about a “critical security vulnerability” in the plugin and told admins to update, or to disable or uninstall the plugin until they can.1 It is one of the most installed plugins in the ecosystem: Moodle Marketplace lists it on 16,655 sites.2

This was the third security release in three weeks. Here is what each one fixed, and what it says about report plugins in general.

What happened, release by release

VersionReleasedWhat it fixed
5.3.119 Oct 2026Two published CVEs: a permission check that warned but still returned the report, and SQL injection through %%FILTER_VAR%%
5.3.21 Nov 2026A review of the whole plugin: permissions per course, sesskeys, output escaping, every filter bound as a parameter, TLS checks on GitHub imports
5.3.310 Nov 2026Custom SQL reports must now start with SELECT or WITH; the keyword check also runs on the query with escape sequences decoded

Sources: the plugin’s GitHub releases3 and the CVE entries for CVE-2026-113607 and CVE-2026-113608.4

5.3.1: two bugs anyone could reach

The first two CVEs were the dangerous kind, because they did not need special rights:

  • CVE-2026-113607. When the permission check failed, the code added a warning and then showed the report anyway. Any logged-in user could ask for a report by its id and read it, including SQL reports over users and grades.
  • CVE-2026-113608. Reports that use the %%FILTER_VAR%% placeholder pasted a value from the URL straight into the SQL. A user who could view such a report could add a UNION SELECT and read other tables, password hashes included.

5.3.2: the full review

The 5.3.2 notes credit “a review of the whole plugin by MDL Shield”.3 The list of fixes reads like the Moodle security checklist: check permissions in the report’s own course, require a sesskey before editing or importing, require the managesqlreports capability for SQL reports, escape all output, bind every filter value as a SQL parameter, verify TLS when fetching reports from GitHub. Password, secret and sesskey columns can no longer be shown or used in filters, and emails sent from a report only go to active users in its course.

It also brought tests: PHPUnit and Behat now cover every report type and the security fixes, and run in GitHub Actions.

5.3.3: the critical one

The notice from Moodle HQ does not describe the bug, and the advisory with full details had not been published when we wrote this. The fix itself is public, though. The commit is titled “Only allow SELECT queries and check them with escape sequences decoded”, and its comment explains the problem in one line:5

Escape sequences in strings can spell keywords […] E'\x55\x50\x44\x41\x54\x45' is UPDATE on PostgreSQL.

Configurable Reports has a “SQL security” setting, on by default. It is meant to keep custom SQL reports read-only by refusing queries that contain words like UPDATE, DELETE, DROP or a semicolon. That is a blocklist, and the commit shows how a blocklist loses. PostgreSQL decodes escape strings (E'...') and Unicode strings (U&'...') inside the database, so a word the PHP check never sees can still reach the database as SQL. Statements like DO, CALL or PREPARE, which run SQL stored in a string, never needed the blocked words at all.

The fix changes the approach. A query now has to start with SELECT or WITH. That is an allowlist. The keyword check also runs a second and third time on the query with both kinds of escape decoded, and EXEC, EXECUTE and UESCAPE are now refused outright.

What does that mean in practice? Our reading of the code, not an official statement: the people who can write custom SQL reports are those with managesqlreports, which no role gets by default. On a site where a manager, a support team or a reporting role was given that capability, this bug let them write to the database, not only read it. Writing to the database on Moodle means being able to make yourself a site admin.

What breaks when you update

5.3.2 and 5.3.3 are stricter, and the release notes say so:3

  • %%FILTER_VAR%% is now a value, not a piece of SQL. A report that passed a whole condition in the URL must move it into the query: AND u.city = %%FILTER_VAR%% with filter_var=Madrid.
  • Old reports are checked when they run, not only when saved. Imported or old reports that fail the SQL security check stop running.
  • Queries must start with SELECT or WITH. Comments and placeholders before it are fine.
  • Course, category, user and role filters narrow the report instead of replacing what the report conditions select. Some totals will change.
  • Scheduled SQL reports run from a scheduled task, because Moodle no longer runs the old block cron.

What to do this week

  1. Update to 5.3.3. It supports Moodle 4.0 to 5.3 and needs PHP 8.0 or later.2
  2. List who has block/configurable_reports:managesqlreports under Site administration, Users, Permissions, Capability overview. Every role there could have used the bug. Remove it from roles that do not write SQL.
  3. Open each custom SQL report after the update. The ones that now fail were either broken by the stricter rules or were doing something they should not.
  4. Check your logs if you ran PostgreSQL and gave out managesqlreports. 5.3.2 added events for report views, edits and exports, so from now on there is a trail.
  5. Do the same for every reporting plugin you run. A plugin that runs SQL typed by users is only as safe as its parser.

The lesson for anyone who builds report plugins

Moodle core has had its own report builder since 4.0, and it does not let users type SQL at all. Reports are built from entities and columns defined in PHP, and every condition is a bound parameter. That is slower to build and less flexible, but it closes the whole class of bug at once.

Plugins that do accept SQL need four things, and Configurable Reports now has them: an allowlist of statements rather than a list of banned words, values always bound as parameters, a capability that no role gets by default, and tests for the attacks, not only for the happy path. The 5.3.3 commit added a test file of 206 lines that does exactly that.5

The other lesson is about trust. 16,655 sites depend on a plugin maintained by two people.2 Its maintainers fixed three releases’ worth of problems in three weeks, with tests, which is a good outcome. But a plugin your registrar’s office depends on deserves the same review you would give your own code.

If you run a custom reporting plugin and want it checked, our Moodle developers do security reviews of plugins like this one, with fixes and tests.

Sources

  1. Moodle HQ, Security announcements, notice of 10 November 2026: “Configurable Reports plugin - critical vulnerability fix”. ↑

  2. Moodle Marketplace, Configurable Reports, installation count and supported versions as of 12 November 2026. ↑ ↑ ↑

  3. Juan Leyva and Sara Arjona, Configurable Reports releases 5.3.1, 5.3.2 and 5.3.3 on GitHub. ↑ ↑ ↑

  4. VulDB, CVE-2026-113607 and CVE-2026-113608. ↑

  5. GitHub, commit bcbfbb6c, “Only allow SELECT queries and check them with escape sequences decoded”. ↑ ↑

Need a Moodle plugin built or rescued?

Tell the scoping assistant what you need. You get a fixed price and a timeline in a few minutes, and an engineer reviews it within one business day.

Get a fixed quote