{"id":"CVE-2023-29201","aliases":["CVE-2023-29201","GHSA-m3jr-cvhj-f35j"],"related":[],"kind":"vulnerability","state":"published","title":"org.xwiki.commons:xwiki-commons-xml Cross-site Scripting vulnerability","summary":"XWiki Commons are technical libraries common to several other top level XWiki projects. The \"restricted\" mode of the HTML cleaner in XWiki, introduced in version 4.2-milestone-1, only escaped `<script>` and `<style>`-tags but neither attributes that can be used to inject scripts nor other dangerous HTML tags like `<iframe>`. As a consequence, any code relying on this \"restricted\" mode for security is vulnerable to JavaScript injection (\"cross-site scripting\"/XSS). When a privileged user with programming rights visits such a comment in XWiki, the malicious JavaScript code is executed in the context of the user session. This allows server-side code execution with programming rights, impacting the confidentiality, integrity and availability of the XWiki instance. This problem has been patched in XWiki 14.6 RC1 with the introduction of a filter with allowed HTML elements and attributes that is enabled in restricted mode. There are no known workarounds apart from upgrading to a version including the fix.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"XWiki Commons are technical libraries common to several other top level XWiki projects. The \"restricted\" mode of the HTML cleaner in XWiki, introduced in version 4.2-milestone-1, only escaped `<script>` and `<style>`-tags but neither attributes that can be used to inject scripts nor other dangerous HTML tags like `<iframe>`. As a consequence, any code relying on this \"restricted\" mode for security is vulnerable to JavaScript injection (\"cross-site scripting\"/XSS). When a privileged user with programming rights visits such a comment in XWiki, the malicious JavaScript code is executed in the context of the user session. This allows server-side code execution with programming rights, impacting the confidentiality, integrity and availability of the XWiki instance. This problem has been patched in XWiki 14.6 RC1 with the introduction of a filter with allowed HTML elements and attributes that is enabled in restricted mode. There are no known workarounds apart from upgrading to a version including the fix.","source":"cvelist"},{"lang":"en","text":"### Impact\nThe \"restricted\" mode of the HTML cleaner in XWiki, introduced in version 4.2-milestone-1, only escaped `<script>` and `<style>`-tags but neither attributes that can be used to inject scripts nor other dangerous HTML tags like `<iframe>`. As a consequence, any code relying on this \"restricted\" mode for security is vulnerable to JavaScript injection (\"cross-site scripting\"/XSS). An example are anonymous comments in XWiki where the HTML macro filters HTML using restricted mode:\n\n```javascript\n{{html}}\n<a href='' onclick='alert(1)'>XSS</a>\n{{/html}}\n```\n\nWhen a privileged user with programming rights visits such a comment in XWiki, the malicious JavaScript code is executed in the context of the user session. This allows server-side code execution with programming rights, impacting the confidentiality, integrity and availability of the XWiki instance.\n\n### Patches\nThis problem has been patched in XWiki 14.6 RC1 with the introduction of a filter with allowed HTML elements and attributes that is enabled in restricted mode.\n\n### Workarounds\nThere are no known workarounds apart from upgrading to a version including the fix.\n\n### References\n* https://github.com/xwiki/xwiki-commons/commit/b11eae9d82cb53f32962056b5faa73f3720c6182 - the patch with the filter\n* https://github.com/xwiki/xwiki-commons/commit/4a185e0594d90cd4916d60aa60bb4333dc5623b2 - the patch with the definitions what is allowed\n* https://jira.xwiki.org/browse/XWIKI-9118 - the security issue with the HTML macro\n* https://jira.xwiki.org/browse/XCOMMONS-1680 - the issue regarding a definition of what is allowed HTML\n* https://jira.xwiki.org/browse/XCOMMONS-2426 - the issue regarding the filter that fixes the security issue\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [Jira XWiki](https://jira.xwiki.org/)\n* Email us at [XWiki Security mailing-list](mailto:security@xwiki.org)","format":"markdown","source":"ghsa"}],"published":"2023-04-12T20:38:17.000Z","modified":"2026-09-10T03:50:01.088Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H","score":9.1,"rating":"CRITICAL"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H","score":9.1,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H","score":9,"rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H","score":9,"rating":"CRITICAL"}],"cwes":["CWE-79"],"affected":[{"ranges":[{"version":">= 4.2-milestone-1, < 14.6-rc-1","status":"affected"}],"vendor":"xwiki","product":"xwiki-commons","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"4.2-milestone-1","status":"affected","fixed":"14.6-rc-1"}],"ecosystem":"Maven","package":"org.xwiki.commons:xwiki-commons-xml","purl":"pkg:maven/org.xwiki.commons/xwiki-commons-xml","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"5.0","lastAffected":"14.5"}],"vendor":"xwiki","product":"xwiki","cpe":"cpe:2.3:a:xwiki:xwiki:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/xwiki/xwiki-commons/security/advisories/GHSA-m3jr-cvhj-f35j","tags":["exploit","patch","vendor-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/xwiki/xwiki-commons/commit/4a185e0594d90cd4916d60aa60bb4333dc5623b2","tags":["patch","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/xwiki/xwiki-commons/commit/b11eae9d82cb53f32962056b5faa73f3720c6182","tags":["patch","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://jira.xwiki.org/browse/XCOMMONS-1680","tags":["exploit","issue-tracking","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://jira.xwiki.org/browse/XCOMMONS-2426","tags":["exploit","issue-tracking","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://jira.xwiki.org/browse/XWIKI-9118","tags":["exploit","issue-tracking","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2023-29201","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/xwiki/xwiki-commons","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"total","date":"2025-02-06T19:58:27.437Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2023-29201","url":"https://www.cve.org/CVERecord?id=CVE-2023-29201","licence":"CVE Terms of Use","modified":"2025-02-06T19:58:35.107Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-m3jr-cvhj-f35j","url":"https://github.com/advisories/GHSA-m3jr-cvhj-f35j","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:01.088Z"},{"source":"nvd","name":"NVD","id":"CVE-2023-29201","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-29201","licence":"Public domain","modified":"2026-06-17T05:49:35.957Z"}],"updatedAt":"2026-11-25T22:58:23.527Z","epss":{"score":0.01153,"percentile":0.67911,"date":"2026-12-02T12:00:21.000Z"}}