{"id":"CVE-2024-31981","aliases":["CVE-2024-31981","GHSA-vxwr-wpjv-qjq7"],"related":[],"kind":"vulnerability","state":"published","title":"XWiki Platform: Privilege escalation (PR) from user registration through PDFClass","summary":"XWiki Platform is a generic wiki platform. Starting in version 3.0.1 and prior to versions 4.10.20, 15.5.4, and 15.10-rc-1, remote code execution is possible via PDF export templates. This vulnerability has been patched in XWiki 14.10.20, 15.5.4 and 15.10-rc-1. If PDF templates are not typically used on the instance, an administrator can create the document `XWiki.PDFClass` and block its edition, after making sure that it does not contain a `style` attribute. Otherwise, there are no known workarounds aside from upgrading.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"XWiki Platform is a generic wiki platform. Starting in version 3.0.1 and prior to versions 4.10.20, 15.5.4, and 15.10-rc-1, remote code execution is possible via PDF export templates. This vulnerability has been patched in XWiki 14.10.20, 15.5.4 and 15.10-rc-1. If PDF templates are not typically used on the instance, an administrator can create the document `XWiki.PDFClass` and block its edition, after making sure that it does not contain a `style` attribute. Otherwise, there are no known workarounds aside from upgrading.","source":"cvelist"},{"lang":"en","text":"### Impact\nRemote code execution is possible via PDF export templates.\nTo reproduce on an installation, register a new user account with username `PDFClass` if `XWiki.PDFClass` does not exist.\nOn `XWiki.PDFClass`, use the class editor to add a \"style\" property of type \"TextArea\" and content type \"Plain Text\".\nThen, add an object of class `PDFClass` and set the \"style\" attribute to `$services.logging.getLogger('PDFClass').error(\"I got programming: $services.security.authorization.hasAccess('programming')\")`.\nFinally, go to `<host>/xwiki/bin/export/Main/WebHome?format=pdf&pdftemplate=XWiki.PDFClass`. If the logs contain \"ERROR PDFClass - I got programming: true\", the instance is vulnerable.\n\n### Patches\nThis vulnerability has been patched in XWiki 14.10.20, 15.5.4 and 15.10-rc-1.\n\n### Workarounds\nIf PDF templates are not typically used on the instance, an administrator can create the document `XWiki.PDFClass` and block its edition, after making sure that it does not contain a `style` attribute.\nOtherwise, the instance needs to be updated.\n\n### References\n- https://jira.xwiki.org/browse/XWIKI-21337\n- https://github.com/xwiki/xwiki-platform/commit/d28e21a670c69880b951e415dd2ddd69d273eae9","format":"markdown","source":"ghsa"},{"lang":"es","text":"XWiki Platform es una plataforma wiki genérica. A partir de la versión 3.0.1 y anteriores a las versiones 4.10.20, 15.5.4 y 15.10-rc-1, la ejecución remota de código es posible mediante plantillas de exportación de PDF. Esta vulnerabilidad ha sido parcheada en XWiki 14.10.20, 15.5.4 y 15.10-rc-1. Si las plantillas PDF no se utilizan normalmente en la instancia, un administrador puede crear el documento \"XWiki.PDFClass\" y bloquear su edición, después de asegurarse de que no contiene un atributo \"estilo\". De lo contrario, no se conocen workarounds aparte de la actualización.","source":"nvd"}],"published":"2024-04-10T17:11:45.000Z","modified":"2026-09-10T03:50:00.424Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","score":10,"rating":"CRITICAL"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","score":10,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","score":9.9,"rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"}],"cwes":["CWE-862"],"affected":[{"ranges":[{"version":">= 3.0.1, < 14.10.20","status":"affected"},{"version":">= 15.0-rc-1, < 15.5.4","status":"affected"},{"version":">= 15.6-rc-1, < 15.10-rc-1","status":"affected"}],"vendor":"xwiki","product":"xwiki-platform","source":"cvelist"},{"ranges":[{"type":"custom","introduced":"3.01","fixed":"14.10.19","status":"affected"},{"type":"custom","introduced":"15.0-rc-1","fixed":"15.5.4","status":"affected"},{"type":"custom","introduced":"15.6-rc-1","fixed":"15.9","status":"affected"}],"vendor":"xwiki","product":"xwiki","cpe":"cpe:2.3:a:xwiki:xwiki:*:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"3.0.1","status":"affected","fixed":"14.10.20"}],"ecosystem":"Maven","package":"org.xwiki.platform:xwiki-platform-oldcore","purl":"pkg:maven/org.xwiki.platform/xwiki-platform-oldcore","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"15.0-rc-1","status":"affected","fixed":"15.5.4"}],"ecosystem":"Maven","package":"org.xwiki.platform:xwiki-platform-oldcore","purl":"pkg:maven/org.xwiki.platform/xwiki-platform-oldcore","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"15.6-rc-1","status":"affected","fixed":"15.10-rc-1"}],"ecosystem":"Maven","package":"org.xwiki.platform:xwiki-platform-oldcore","purl":"pkg:maven/org.xwiki.platform/xwiki-platform-oldcore","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"3.0.1","fixed":"14.10.19"},{"status":"affected","introduced":"15.0","fixed":"15.5.4"},{"status":"affected","introduced":"15.6","fixed":"15.9"}],"vendor":"xwiki","product":"xwiki","cpe":"cpe:2.3:a:xwiki:xwiki:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/xwiki/xwiki-platform/security/advisories/GHSA-vxwr-wpjv-qjq7","tags":["vendor-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/xwiki/xwiki-platform/commit/480186f9d2fca880513da8bc5a609674d106cbd3","tags":["patch","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/xwiki/xwiki-platform/commit/a4ad14d9c1605a5ab957237e505ebbb29f5b9d73","tags":["patch","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/xwiki/xwiki-platform/commit/d28e21a670c69880b951e415dd2ddd69d273eae9","tags":["patch","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://jira.xwiki.org/browse/XWIKI-21337","tags":["exploit","vendor-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-31981","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/xwiki/xwiki-platform","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2024-06-26T17:31:37.472Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-31981","url":"https://www.cve.org/CVERecord?id=CVE-2024-31981","licence":"CVE Terms of Use","modified":"2024-08-13T13:37:34.850Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-vxwr-wpjv-qjq7","url":"https://github.com/advisories/GHSA-vxwr-wpjv-qjq7","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:00.424Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-31981","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-31981","licence":"Public domain","modified":"2026-06-17T07:29:03.420Z"}],"updatedAt":"2026-11-25T22:58:39.074Z","epss":{"score":0.01447,"percentile":0.74076,"date":"2026-12-01T12:00:22.000Z"}}