ghsa-c32m-27pj-4xcj
Vulnerability from github
Impact
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.
Patches
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.
Workarounds
We're not aware of any workarounds except for being careful when editing content authored by untrusted users.
References
- https://jira.xwiki.org/browse/XWIKI-22763
- https://jira.xwiki.org/browse/XWIKI-22759
- https://jira.xwiki.org/browse/XWIKI-22758
- https://jira.xwiki.org/browse/XWIKI-22799
- https://github.com/xwiki/xwiki-platform/commit/abdcefc0db27035b67329add836fd683e0cf92b8
- https://github.com/xwiki/xwiki-platform/commit/cc74dc802efe0e2d3fa2ba3355dbadc51c5fd8c7
- https://github.com/xwiki/xwiki-platform/commit/0a705e8e253cb871b804e25c53b2bde879c886bd
- https://github.com/xwiki/xwiki-platform/commit/3d451e957fe2b14459e9ac64172b4a0e4c46971c
{ "affected": [ { "package": { "ecosystem": "Maven", "name": "org.xwiki.platform:xwiki-platform-rendering-xwiki" }, "ranges": [ { "events": [ { "introduced": "15.9-rc-1" }, { "fixed": "16.4.7" } ], "type": "ECOSYSTEM" } ] }, { "package": { "ecosystem": "Maven", "name": "org.xwiki.platform:xwiki-platform-rendering-xwiki" }, "ranges": [ { "events": [ { "introduced": "16.5.0-rc-1" }, { "fixed": "16.10.3" } ], "type": "ECOSYSTEM" } ] }, { "package": { "ecosystem": "Maven", "name": "org.xwiki.platform:xwiki-platform-rendering-xwiki" }, "ranges": [ { "events": [ { "introduced": "17.0.0-rc-1" }, { "fixed": "17.0.0" } ], "type": "ECOSYSTEM" } ] }, { "package": { "ecosystem": "Maven", "name": "org.xwiki.platform:xwiki-platform-rendering-macro-cache" }, "ranges": [ { "events": [ { "introduced": "15.9-rc-1" }, { "fixed": "16.4.7" } ], "type": "ECOSYSTEM" } ] }, { "package": { "ecosystem": "Maven", "name": "org.xwiki.platform:xwiki-platform-rendering-macro-cache" }, "ranges": [ { "events": [ { "introduced": "16.5.0-rc-1" }, { "fixed": "16.10.3" } ], "type": "ECOSYSTEM" } ] }, { "package": { "ecosystem": "Maven", "name": "org.xwiki.platform:xwiki-platform-rendering-macro-cache" }, "ranges": [ { "events": [ { "introduced": "17.0.0-rc-1" }, { "fixed": "17.0.0" } ], "type": "ECOSYSTEM" } ] }, { "package": { "ecosystem": "Maven", "name": "org.xwiki.platform:xwiki-platform-security-requiredrights-default" }, "ranges": [ { "events": [ { "introduced": "15.9-rc-1" }, { "fixed": "16.4.7" } ], "type": "ECOSYSTEM" } ] }, { "database_specific": { "last_known_affected_version_range": "\u003c 16.10.3" }, "package": { "ecosystem": "Maven", "name": "org.xwiki.platform:xwiki-platform-security-requiredrights-default" }, "ranges": [ { "events": [ { "introduced": "16.5.0-rc-1" }, { "fixed": "17.0.0" } ], "type": "ECOSYSTEM" } ] }, { "package": { "ecosystem": "Maven", "name": "org.xwiki.platform:xwiki-platform-security-requiredrights-default" }, "ranges": [ { "events": [ { "introduced": "17.0.0-rc-1" }, { "fixed": "17.0.0" } ], "type": "ECOSYSTEM" } ] }, { "package": { "ecosystem": "Maven", "name": "org.xwiki.platform:xwiki-platform-rendering-macro-context" }, "ranges": [ { "events": [ { "introduced": "15.9-rc-1" }, { "fixed": "16.4.7" } ], "type": "ECOSYSTEM" } ] }, { "package": { "ecosystem": "Maven", "name": "org.xwiki.platform:xwiki-platform-rendering-macro-context" }, "ranges": [ { "events": [ { "introduced": "16.5.0-rc-1" }, { "fixed": "16.10.3" } ], "type": "ECOSYSTEM" } ] }, { "package": { "ecosystem": "Maven", "name": "org.xwiki.platform:xwiki-platform-rendering-macro-context" }, "ranges": [ { "events": [ { "introduced": "17.0.0-rc-1" }, { "fixed": "17.0.0" } ], "type": "ECOSYSTEM" } ] } ], "aliases": [ "CVE-2025-49582" ], "database_specific": { "cwe_ids": [ "CWE-357" ], "github_reviewed": true, "github_reviewed_at": "2025-06-13T20:38:58Z", "nvd_published_at": "2025-06-13T17:15:23Z", "severity": "HIGH" }, "details": "### Impact\nWhen 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\u0027t consider non-lowercase parameters. Further, most macro parameters that can contain XWiki syntax like titles of information boxes weren\u0027t analyzed at all. Similarly, the \"source\" parameters of the content and context macro weren\u0027t 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.\n\n### Patches\nThe 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.\n\n### Workarounds\nWe\u0027re not aware of any workarounds except for being careful when editing content authored by untrusted users.\n\n### References\n* https://jira.xwiki.org/browse/XWIKI-22763\n* https://jira.xwiki.org/browse/XWIKI-22759\n* https://jira.xwiki.org/browse/XWIKI-22758\n* https://jira.xwiki.org/browse/XWIKI-22799\n* https://github.com/xwiki/xwiki-platform/commit/abdcefc0db27035b67329add836fd683e0cf92b8\n* https://github.com/xwiki/xwiki-platform/commit/cc74dc802efe0e2d3fa2ba3355dbadc51c5fd8c7\n* https://github.com/xwiki/xwiki-platform/commit/0a705e8e253cb871b804e25c53b2bde879c886bd\n* https://github.com/xwiki/xwiki-platform/commit/3d451e957fe2b14459e9ac64172b4a0e4c46971c", "id": "GHSA-c32m-27pj-4xcj", "modified": "2025-06-13T20:38:59Z", "published": "2025-06-13T20:38:58Z", "references": [ { "type": "WEB", "url": "https://github.com/xwiki/xwiki-platform/security/advisories/GHSA-c32m-27pj-4xcj" }, { "type": "ADVISORY", "url": "https://nvd.nist.gov/vuln/detail/CVE-2025-49582" }, { "type": "WEB", "url": "https://github.com/xwiki/xwiki-platform/commit/0a705e8e253cb871b804e25c53b2bde879c886bd" }, { "type": "WEB", "url": "https://github.com/xwiki/xwiki-platform/commit/3d451e957fe2b14459e9ac64172b4a0e4c46971c" }, { "type": "WEB", "url": "https://github.com/xwiki/xwiki-platform/commit/abdcefc0db27035b67329add836fd683e0cf92b8" }, { "type": "WEB", "url": "https://github.com/xwiki/xwiki-platform/commit/cc74dc802efe0e2d3fa2ba3355dbadc51c5fd8c7" }, { "type": "PACKAGE", "url": "https://github.com/xwiki/xwiki-platform" }, { "type": "WEB", "url": "https://jira.xwiki.org/browse/XWIKI-22758" }, { "type": "WEB", "url": "https://jira.xwiki.org/browse/XWIKI-22759" }, { "type": "WEB", "url": "https://jira.xwiki.org/browse/XWIKI-22763" }, { "type": "WEB", "url": "https://jira.xwiki.org/browse/XWIKI-22799" } ], "schema_version": "1.4.0", "severity": [ { "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N", "type": "CVSS_V4" } ], "summary": "XWiki\u0027s required right warnings for macros are incomplete" }
- Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
- Confirmed: The vulnerability is confirmed from an analyst perspective.
- Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
- Patched: This vulnerability was successfully patched by the user reporting the sighting.
- Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
- Not confirmed: The user expresses doubt about the veracity of the vulnerability.
- Not patched: This vulnerability was not successfully patched by the user reporting the sighting.