CVE-2025-49582·Python vulnerability
XWiki is a generic wiki platform. When editing content that contains "dangerous" macros like malicious script macros that were authored by a user with fewer rights, XWiki warns about the execution of these macros since XWiki 15.9RC1. These required rights analyzers that trigger these warnings are incomplete, allowing an attacker to hide malicious content. For most macros, the existing analyzers don't consider non-lowercase parameters. Further, most macro parameters that can contain XWiki syntax like titles of information boxes weren't analyzed at all. Similarly, the "source" parameters of the content and context macro weren't anylzed even though they could contain arbitrary XWiki syntax. In the worst case, this could allow a malicious to add malicious script macros including Groovy or Python macros to a page that are then executed after another user with programming righs edits the page, thus allowing remote code execution. The required rights analyzers have been made more robust and extended to cover those cases in XWiki 16.4.7, 16.10.3 and 17.0.0.
- Severity
- high
- Software
- Python
- Fixed in
- 16.10.3
- Published
- 2025-06-13
Affected versions
From: 16.5.0
Until: 16.10.3
Fixed in: 16.10.3
How to fix this CVE
Update XWiki to version 16.10.3 or later to patch the macro rights analyzer bypass vulnerability. This fix strengthens validation of macro parameters, including non-lowercase variants and XWiki syntax within parameter values, preventing attackers from injecting hidden malicious script macros that execute with elevated privileges.
sudo dnf update python3Defensia detects this vulnerability
WAF mitigation (if patching is not yet possible)
Add this rule to your WAF to block exploitation attempts while you schedule the patch.
Implement WAF rules to block XWiki page edit requests (POST to /bin/save/*, /bin/edit/*) containing macro patterns with suspicious parameter variations, such as mixed-case macro names (e.g., {{GroOvY}} or {{gROOVY}}) or nested syntax within parameter values like {{param|content=}}. Log and alert on these patterns as they may indicate exploitation attempts.How to check if you are affected
- Step 1: Verify XWiki version by checking the file /path/to/xwiki/WEB-INF/web.xml or running the XWiki administration console to view the application version number
- Step 2: Query the XWiki database to identify pages edited by lower-privilege users containing macro definitions: SELECT doc_name, doc_author FROM xwikidoc WHERE doc_content LIKE '%{{%macro%}}%' AND doc_author NOT IN (SELECT user_name FROM xwiki_users WHERE user_admin=1)
- Step 3: Search XWiki logs for suspicious macro parameter handling by grepping for warnings related to macro rights: grep -i 'macro.*right' /path/to/xwiki/logs/*.log | grep -i 'warn\|error'
- Step 4: Confirm the patched version is running by checking /path/to/xwiki/WEB-INF/version.properties or the admin console, verifying version >= 16.10.3
FAQ
What is CVE-2025-49582?
CVE-2025-49582 is a vulnerability in XWiki's macro rights analyzer that fails to properly validate macro parameters, allowing attackers to bypass security warnings and hide malicious script macros (such as Groovy or Python) that execute with elevated privileges when edited by authorized users.
Is CVE-2025-49582 being actively exploited?
No, according to CISA's Known Exploited Vulnerabilities (KEV) catalog and available public information, CVE-2025-49582 is not currently being actively exploited in the wild, though the vulnerability permits remote code execution and should be prioritized for patching.
What versions of XWiki are affected by CVE-2025-49582?
XWiki versions 16.5.0 through 16.10.2 are vulnerable; versions 16.4.7, 16.10.3, and 17.0.0 or later contain the fix.
How do I check if my server is vulnerable to CVE-2025-49582?
Run `curl -s http://your-xwiki-instance/bin/view/XWiki/XWikiVersion | grep -oP 'version>\K[^<]+'` to extract the version number, then compare it against the affected range (16.5.0–16.10.2). If your version falls within this range, apply the patch immediately.
Does Defensia detect CVE-2025-49582?
Yes — Defensia's CVE advisory scanner compares installed XWiki versions against the NVD database. If an affected version is detected on a monitored server, CVE-2025-49582 will appear in your dashboard with remediation steps and version requirements.
Related Python CVEs
References
- https://github.com/xwiki/xwiki-platform/commit/0a705e8e253cb871b804e25c53b2bde879c886bd
- https://github.com/xwiki/xwiki-platform/commit/3d451e957fe2b14459e9ac64172b4a0e4c46971c
- https://github.com/xwiki/xwiki-platform/commit/abdcefc0db27035b67329add836fd683e0cf92b8
- https://github.com/xwiki/xwiki-platform/commit/cc74dc802efe0e2d3fa2ba3355dbadc51c5fd8c7
- https://github.com/xwiki/xwiki-platform/security/advisories/GHSA-c32m-27pj-4xcj
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2025-49582. Free for 1 server.
Get started free