OpenAI Chat Block CVE-2025-60511
MEDIUMAttack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate to Moodle as enrolled student
-
DeliveryIdentify or enumerate admin blockId values via sequential integer guessing
-
ExploitCraft POST request to /blocks/openai_chat/api/completion.php with target blockId
-
ExecutionServer executes query under admin block configuration
-
PersistReceive admin Source of Truth content and privileged AI responses
-
ImpactRepeat to exhaust API quota
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V8 - Authorization Object-level authorization, IDOR prevention
|
| Exploitation Conditions | Requires a valid Moodle user account at any role level (student or higher; CVSS PR:L). The target Moodle instance must have the OpenAI Chat Block plugin version 3.0.1 installed with at least one admin-configured block that has a non-default system prompt or Source of Truth entries. The attacker must be able to enumerate or guess a valid blockId belonging to a more privileged user - blockIds are typically sequential integers in Moodle's database, making enumeration straightforward. No special network position is required (AV:N). Exploitation is limited by: the requirement for a valid institutional Moodle account (eliminates unauthenticated external attackers), the need for the plugin to be installed (rare outside Moodle deployments that have adopted AI chat features), and the fact that meaningful data exposure only occurs when admin blocks contain sensitive custom configurations. |
| Impact | The NVD CVSS of 4.3 (AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N) reflects the low privilege bar and network accessibility but caps impact at partial confidentiality, which is appropriate for the base case. The EPSS at 0.23% (14th percentile) signals that automated or opportunistic exploitation at scale is unlikely, consistent with the requirement for a valid Moodle account. No CISA KEV listing is present. However, a public proof-of-concept exists (onurcangenc.com.tr writeup and GitHub PoC), which meaningfully lowers the skill bar for targeted exploitation. Real-world risk is elevated for Moodle deployments that use this plugin to deliver sensitive AI-assisted instruction or store confidential administrative knowledge in block configurations; for general Moodle deployments without this plugin the risk is zero. The CVSS I:N rating is defensible for persistent data integrity but may underweight the ability to consume API resources (quota exhaustion under the admin's API key), which constitutes a limited but real availability impact not reflected in the official vector. |
| Exploit ScenarioDerived | An authenticated student logs into Moodle, then iterates or guesses integer blockId values in POST requests to |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jul 05, 2026
Insecure Direct Object Reference in the Moodle OpenAI Chat Block plugin 3.0.1 allows any authenticated student to hijack administrator-configured AI block sessions by supplying an arbitrary blockId to the completion API endpoint. An attacker leveraging this flaw can read admin-only 'Source of Truth' prompt configurations, steer AI responses using privileged system instructions, and consume API quota tied to another user's block. A public proof-of-concept writeup and associated GitHub repository exist, though no confirmed active exploitation (CISA KEV) has been recorded; EPSS sits at 0.23% (14th percentile), indicating low but non-zero real-world exploitation interest.
RemediationAI
No vendor-released patch has been identified at time of analysis. Administrators should immediately audit whether the OpenAI Chat Block plugin is in use and assess whether any blocks contain sensitive 'Source of Truth' configurations or privileged system prompts. As a compensating control, web server-level access restrictions on /blocks/openai_chat/api/completion.php can be applied to limit requests to specific authenticated roles or IP ranges - note this may break legitimate student use of the chat feature. Alternatively, disabling the plugin entirely eliminates the attack surface at the cost of removing AI chat functionality. The researcher's writeup at https://onurcangenc.com.tr/posts/idor-in-moodle-openai-chat-block-block_openai_chat-proof-of-concept-poc--cve-2025-60511/ describes the PoC; administrators can use that detail to implement server-side blockId ownership validation in the interim if they have PHP development capability.
Affected ProductsAI
The Moodle OpenAI Chat Block plugin version 3.0.1 (build 2025021700) is confirmed affected per the CVE description. This is a third-party plugin installed into Moodle LMS instances; it is not part of Moodle core. No CPE strings were provided in the input data. Moodle core versions and operating systems are not specified as preconditions beyond hosting a compatible Moodle instance with this plugin installed and at least one admin-configured block present. The researcher's PoC repository is available at https://github.com/onurcangnc/moodle_block_openai_chat.
Affects your stack
Find out whether the stacks and servers you run are on an affected version.
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The vulnerability resides in CWE-639 (Authorization Through User-Controlled Key): the application uses a caller-supplied blockId parameter to look up a block object and execute a completion request under that block's configuration, without verifying that the requesting user owns or has permission to use that block. The affected file is /blocks/openai_chat/api/completion.php, a PHP endpoint that serves as the back-end bridge between Moodle's block framework and the OpenAI Chat Completions API. Because Moodle's block system allows administrators to define per-block system prompts and 'Source of Truth' knowledge entries (admin-only content), an IDOR here is particularly impactful: the attacker does not merely read a record but executes live AI queries under a privileged configuration. No CPE strings were provided in the input data; the affected product is third-party and not part of Moodle core.
Know when PHP 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
AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N
Network-accessible IDOR requiring only low-privilege authentication; A:L added over NVD rating because API quota misuse under another user's key constitutes a concrete availability impact.
Primary rating from Vendor (mitre).
CVSS VectorVendor: mitre
DescriptionCVE.org
Moodle OpenAI Chat Block plugin 3.0.1 (2025021700) suffers from an Insecure Direct Object Reference (IDOR) vulnerability due to insufficient validation of the blockId parameter in /blocks/openai_chat/api/completion.php. An authenticated student can impersonate another user's block (e.g., administrator) and send queries that are executed with that block's configuration. This can expose administrator-only Source of Truth entries, alter model behavior, and potentially misuse API resources.
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
Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.
In PHP versions 7.1.x below 7.1.33, 7.2.x below 7.2.24 and 7.3.x below 7.3.11 in certain configurations of FPM setup it
sapi/cgi/cgi_main.c in PHP before 5.3.12 and 5.4.x before 5.4.2, when configured as a CGI script (aka php-cgi), does not
(1) boardData102.php, (2) boardData103.php, (3) boardDataJP.php, (4) boardDataNA.php, and (5) boardDataWW.php in Netgear
The '/common/download_agent_installer.php' script in the Quest KACE System Management Appliance 8.0.318 is accessible by
ProjectSend versions prior to r1720 are affected by an improper authentication vulnerability. Rated critical severity (C
Roundcube Webmail contains a critical PHP object deserialization vulnerability (CVE-2025-49113, CVSS 9.9) that allows au
Util/PHP/eval-stdin.php in PHPUnit before 4.8.28 and 5.x before 5.6.3 allows remote attackers to execute arbitrary PHP c
Palo Alto Networks PAN-OS management web interface contains an authentication bypass allowing unauthenticated attackers
Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re
Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re
The get_referers function in /opt/ws/bin/sblistpack in Sophos Web Appliance before 3.7.9.1 and 3.8 before 3.8.1.1 allows
The Backup Migration plugin for WordPress is vulnerable to Remote Code Execution in all versions up to, and including, 1
NVD
CVE.org
EPSS
GitHub
VulDB
Exploit-DB