Loading...
Skip to main content

CVE-2026-40308 — Vulnerability in joedolson/my-calendar — CVE Details

HIGH

Unauthenticated Information Disclosure (IDOR) via Multisite switch_to_blog in My Calendar

Published April 16, 2026Updated April 16, 2026Source: osv

Summary

### Summary An unauthenticated Insecure Direct Object Reference (IDOR) and Denial of Service (DoS) vulnerability in the My Calendar plugin allows any unauthenticated user to extract calendar events (including private or hidden ones) from any sub-site on a WordPress Multisite network. On standard Single Site WordPress installations, this same endpoint crashes the PHP worker thread, creating an unauthenticated Denial of Service (DoS) vector. ### Details The vulnerability stems from the `mc_ajax_mcjs_action AJAX` function, which handles the `mcjs_action` endpoint. This endpoint is explicitly registered for unauthenticated users: ```php <?php // In my-calendar-ajax.php add_action( 'wp_ajax_nopriv_mcjs_action', 'mc_ajax_mcjs_action' ); ``` When the behavior parameter is set to loadupcoming, the plugin accepts an args parameter from the $_REQUEST array. Instead of validating specific expected arguments, the plugin unsafely passes the entire string into PHP's parse_str() function: ```php <?php $request = isset( $_REQUEST['args'] ) ? wp_unslash( sanitize_text_field( $_REQUEST['args'] ) ) : array(); $request = str_replace( '|', '&', $request ); $request = parse_str( $request, $args ); // ... $response = my_calendar_upcoming_events( $args ); ``` This allows an attacker to inject arbitrary key-value pairs into the $args array. This array is then passed to the my_calendar_upcoming_events() function located in my-calendar-widgets.php. At the beginning of this function, the plugin processes the attacker-controlled site argument: ```php <?php // In my-calendar-widgets.php if ( $args['site'] ) { $args['site'] = ( 'global' === $args['site'] ) ? BLOG_ID_CURRENT_SITE : $args['site']; switch_to_blog( $args['site'] ); } ``` The plugin blindly passes the attacker's supplied site ID into WordPress core's `switch_to_blog()` function without checking if the requesting user has the appropriate network-level privileges (e.g., Super Admin). On Multisite configurations, the database context switches to the targeted sub-site, queries its events, and returns the HTML-rendered events array in the JSON response, leading to Information Disclosure across tenant boundaries. On Single Site configurations, the switch_to_blog() function does not exist in WordPress core. Calling it triggers an Uncaught PHP Error (Call to undefined function switch_to_blog()), resulting in a 500 Internal Server error ("Critical Error"). Repeated requests to this unauthenticated endpoint easily exhaust server resources. ### PoC ## 1. Multisite Information Disclosure - IDOR ``` curl -s "http://<target-domain>/wp-admin/admin-ajax.php?action=mcjs_action&behavior=loadupcoming&args=site=2" ``` ## 2. Single Site Denial of Service (DoS) If the WordPress instance is not a Multisite, passing any truthy value to the site parameter will instantly crash the request thread: ``` curl -i -s "http://<target-domain>/wp-admin/admin-ajax.php?action=mcjs_action&behavior=loadupcoming&args=site=1" ``` ### Impact **Vulnerability Type**: Insecure Direct Object Reference (IDOR) / Information Exposure / Denial of Service (DoS) **Who is impacted**: All sites running the "My Calendar" plugin. Anonymous internet users can silently map the network and extract private, unpublished, or intranet-specific events from unlaunched/internal sub-sites. Standard Single Site users are vulnerable to an easy-to-execute application-layer DoS, as it costs an attacker negligible resources to constantly crash PHP worker threads at an unauthenticated endpoint.

Advisory Timeline

  • First published April 16, 2026 (179 days ago).
  • Last revised April 16, 2026 — 0 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Composer
Update joedolson/my-calendar to 3.7.7 or later
composer require "joedolson/my-calendar:^3.7.7"

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (1)

Affects 1 ecosystem: packagist (1).

PackageEcosystemAffectedFixed In
joedolson/my-calendar
packagist
v3.2.11, v3.2.12, v3.2.13, v3.2.14 (+120 more)3.7.7

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

  • CWE-639
    Insecure Direct Object Reference (IDOR)MITRE

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 8.2 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
—
Confidentiality
—
Integrity
—
Availability
—

CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:H/SC:N/SI:N/SA:N

Frequently Asked Questions

What is CVE-2026-40308?
Unauthenticated Information Disclosure (IDOR) via Multisite switch_to_blog in My Calendar This vulnerability has been assigned a severity rating of HIGH (CVSS score: 8.2/10).
How do I check if my project is affected by CVE-2026-40308?
CVE-2026-40308 affects joedolson/my-calendar. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-40308 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
8.2

High exploitability or significant impact. Prioritize remediation within days.

Also Known As

GHSA-2mvx-f5qm-v2ch

Related CVEs

  • CVE-2026-65954
    HIGH

    PHPCSUtils: Remote code execution via eval() in AbstractArrayDeclarationSniff::getActualArrayKey()

  • CVE-2026-61825
    HIGH

    code16/sharp has a stored XSS via data-html-content Sanitizer Bypass

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies