The vulnerability allows unauthenticated users to access files uploaded through forms. My analysis of the provided patches pinpoints the exact location of the flaw. The commit 5919534a979a97444172f49705b7a224e372e625 introduces a fix by removing guest permissions on uploaded files.
The investigation focused on the modified file UploadFileEntryMVCActionCommand.java. Two key functions were identified:
-
com.liferay.dynamic.data.mapping.form.web.internal.portlet.action.UploadFileEntryMVCActionCommand.doProcessAction: This is the main action command that gets triggered upon file upload. It's the entry point for the vulnerable operation. A runtime profiler would show this function in the stack trace during exploitation.
-
com.liferay.dynamic.data.mapping.form.web.internal.portlet.action.UploadFileEntryMVCActionCommand$DDMFormUploadFileEntryHandler.addFileEntry: This inner class method contains the core logic flaw. It's responsible for adding the file to the repository. Before the patch, it failed to restrict guest access. The patch directly modifies this function to remove the VIEW permission for the GUEST role, thus remediating the vulnerability.
The root cause is improper default permissions being applied to uploaded files, making them world-readable. The identified functions are critical runtime indicators for this vulnerability, as they are directly involved in the file upload process and the application of security permissions.