It’s possible for an unprivileged user to perform a remote code execution by injecting a groovy script in her own profile and by calling the Reset password feature since the feature is performing a save of the user profile with programming rights in the impacted versions of XWiki.
The problem has been patched in XWiki 13.1RC1 with a complete refactoring of the Reset password feature.
There’s different possible workarounds, all consisting in modifying the XWiki/ResetPassword page.
https://jira.xwiki.org/browse/XWIKI-16661
If you have any questions or comments about this advisory: