The vulnerability, GHSA-8c52-x9w7-vc95, is a missing authorization flaw in the 'view file' macro of XWiki Pro Macros. It allows a user to view the content of an office file attachment from a restricted page if it's embedded on a public page, even if the user lacks view rights for the restricted content.
The analysis of the patch that fixes this vulnerability reveals that the issue was not in a compiled Java class but in a Velocity template file: xwiki-pro-macros-api/src/main/resources/templates/viewfile/viewFileTemplate.vm. This template contains the rendering logic for the macro.
The patch, found in commit 481f5a8bc6622bb40b7843f85050f23867342917, introduces a crucial security check. It now uses the $xwiki.checkAccess() function to verify if the user has 'view' rights on the attachment before proceeding to render its content. Previously, the template would directly call the #continueExecutingMacro to display the file, completely bypassing any permission checks.
The vulnerable function is therefore the rendering process of the viewFileTemplate.vm itself. During exploitation, a profiler would show the execution of this template as it processes the malicious macro, leading to the unauthorized disclosure of the attachment's content.