☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]

CVE-2025-60511

CVE-2025-60511 Insecure Direct Object Reference in Moodle
📅 PUBLISHED: 2025-10-21 00:00 UTC 🔄 UPDATED: 2026-09-23 20:35 UTC
[ ZERO-DAY / UNPATCHED ] [ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.22%
👁️
0.22% probability
5.4× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
Country: Australia License: Open Source
VULNERABLE: UNKNOWN / CHECK VENDOR
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
4.3
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2025-60511 is an Insecure Direct Object Reference (IDOR) vulnerability in the Moodle OpenAI Chat Block plugin version 3.0.1 (2025021700). The flaw resides in /blocks/openai_chat/api/completion.php, where the blockId parameter is not properly validated. An authenticated student can impersonate another user's block (e.g., an administrator) by manipulating this parameter, allowing them to send queries that execute with the target block's configuration. This can expose administrator-only Source of Truth entries, alter model behavior, and potentially misuse API resources. The vulnerability is currently unpatched, and no official fix has been released.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

This vulnerability affects a Moodle plugin distributed via the Moodle plugins directory. Since Moodle plugins are not managed via NPM, PyPI, Go, or Ruby, the supply chain risk is limited to the plugin's update mechanism. Administrators should monitor the plugin's page for updates and verify the integrity of downloaded packages.

CVSS Breakdown & Threat Level

The CVSS score is listed as 0.0, indicating that no official CVSS vector has been assigned. Based on the vulnerability description, a reasonable assessment would be:

  • Attack Vector (AV): Network (N) – The vulnerability is exploitable remotely.
  • Attack Complexity (AC): Low (L) – No special conditions are required.
  • Privileges Required (PR): Low (L) – An authenticated student account is needed.
  • User Interaction (UI): None (N) – No user interaction is required.
  • Scope (S): Changed (C) – The vulnerable component impacts resources beyond its security scope.
  • Confidentiality (C): High (H) – Administrator-only Source of Truth entries can be exposed.
  • Integrity (I): High (H) – Model behavior can be altered.
  • Availability (A): Low (L) – API resources could be misused, potentially leading to denial of service.

Estimated CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:L

Estimated Base Score: 9.0 (Critical)

Deep Dive & Mechanics

The vulnerability is a classic IDOR (CWE-639) in the Moodle OpenAI Chat Block plugin. The plugin allows users to create and configure chat blocks, each identified by a blockId. The API endpoint /blocks/openai_chat/api/completion.php processes chat queries and uses the blockId parameter to load the block's configuration, including API keys, model settings, and Source of Truth entries.

The flaw is that the endpoint does not verify whether the authenticated user owns the specified blockId. An attacker can enumerate or guess valid blockId values belonging to other users, including administrators. By sending a request with a victim's blockId, the attacker can:

  1. Expose Source of Truth entries: Administrator blocks may contain sensitive data or custom instructions.
  2. Alter model behavior: The attacker can send queries that use the administrator's configuration, potentially bypassing restrictions.
  3. Misuse API resources: The attacker can consume the administrator's API quota or incur costs.

The attack requires only a valid session cookie from an authenticated student account. No special privileges are needed.

Vulnerable vs. Patched Code

Vulnerable Code (simplified):

// /blocks/openai_chat/api/completion.php
$blockId = required_param('blockId', PARAM_INT);
$block = $DB->get_record('block_instances', array('id' => $blockId));
// No ownership check
$config = unserialize($block->configdata);
// Process query with $config

Patched Code (hypothetical):

// /blocks/openai_chat/api/completion.php
$blockId = required_param('blockId', PARAM_INT);
$block = $DB->get_record('block_instances', array('id' => $blockId));
// Verify ownership
$context = context_block::instance($blockId);
require_capability('moodle/block:view', $context);
// Or check userid
if ($block->userid != $USER->id) {
    print_error('invalidblock', 'block_openai_chat');
}
$config = unserialize($block->configdata);
// Process query with $config

The patched version adds an ownership check using Moodle's capability system or a direct user ID comparison.

Exploitation & Lab Setup

Red Team

Prerequisites:

  • A Moodle instance with the OpenAI Chat Block plugin version 3.0.1 installed.
  • An authenticated student account.

Exploitation Steps:

  1. Identify a target block: Use a tool like Burp Suite or a simple script to enumerate blockId values. Blocks are typically sequential integers.

  2. Craft the request: Send a POST request to /blocks/openai_chat/api/completion.php with the following parameters:

    • blockId: The target block's ID (e.g., 42).
    • message: A query to send to the OpenAI API.

    Example using curl:

    curl -X POST \
      'https://target-moodle.com/blocks/openai_chat/api/completion.php' \
      -H 'Cookie: MoodleSession=your_session_cookie' \
      -d 'blockId=42&message=List all Source of Truth entries.'
    
  3. Analyze the response: The response will contain the OpenAI API output, which may include sensitive data from the administrator's configuration.

Expected Outcome: The attacker receives the OpenAI response as if they were the administrator, exposing any Source of Truth entries or custom instructions.

Blue Team

Detection Steps:

  1. Monitor API access logs: Look for unusual patterns in /blocks/openai_chat/api/completion.php requests, especially from student accounts accessing multiple blockId values.

  2. Check for enumeration: A sudden spike in requests with different blockId parameters from a single user may indicate enumeration.

  3. Review block ownership: Regularly audit block instances to ensure that only authorized users have access to sensitive blocks.

Hunting Query (Splunk):

index=web sourcetype=access_combined
uri="/blocks/openai_chat/api/completion.php"
| stats count by clientip, user, blockId
| where count > 10

Indicators of Compromise (IOCs)

  • Network IOCs:

    • Repeated requests to /blocks/openai_chat/api/completion.php with varying blockId parameters.
    • Requests from student accounts to blockId values not associated with their own blocks.
  • File IOCs:

    • Unusual entries in Moodle's block_instances table where userid does not match the expected owner.
  • Log IOCs:

    • Moodle error logs showing invalidblock errors (if patched) or access to unauthorized blocks.

Detection Engineering

YARA Rule

rule CVE_2025_60511_IDOR_Moodle {
    meta:
        description = "Detects exploitation attempts of CVE-2025-60511 in Moodle OpenAI Chat Block"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "https://nvd.nist.gov/vuln/detail/CVE-2025-60511"
    strings:
        $endpoint = "/blocks/openai_chat/api/completion.php"
        $param_blockId = "blockId="
        $param_message = "message="
    condition:
        $endpoint and $param_blockId and $param_message
}

Sigma Rule

title: CVE-2025-60511 - Moodle OpenAI Chat Block IDOR Exploitation
id: 8a4b3c2d-1e5f-4a7b-9c8d-0e1f2a3b4c5d
status: experimental
description: Detects attempts to exploit an IDOR vulnerability in Moodle OpenAI Chat Block plugin
author: Valters IT
date: 2025-04-10
logsource:
    category: webserver
    product: apache
    service: access
detection:
    selection:
        cs-method: 'POST'
        cs-uri-query|contains: '/blocks/openai_chat/api/completion.php'
        cs-uri-query|contains: 'blockId='
    condition: selection
falsepositives:
    - Legitimate use by administrators
level: high

Suricata Rule

alert http any any -> any any (msg:"CVE-2025-60511 - Moodle OpenAI Chat Block IDOR Exploitation"; flow:to_server,established; content:"POST"; http_method; content:"/blocks/openai_chat/api/completion.php"; http_uri; content:"blockId="; http_client_body; classtype:attempted-user; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Disable the plugin: If the plugin is not critical, disable it until a patch is available.
  2. Restrict access: Use Moodle's role-based permissions to limit who can use the OpenAI Chat Block.
  3. Monitor logs: Enable detailed logging for the API endpoint and review regularly.

Long-term Fix:

  • Apply a patch from the plugin developer once released. The fix should include proper ownership validation using Moodle's capability system.
  • Consider implementing a Web Application Firewall (WAF) rule to block requests with suspicious blockId patterns.

Workaround:

  • Modify the plugin code manually to add an ownership check (see patched code example above). This is not recommended for production without thorough testing.

Valters IT
Securing Digital Frontiers

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2025-60511/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.