The vulnerability described is an improper access control issue in the /api/schemas/history/[schemaId] endpoint of FormCMS, allowing unauthenticated access to schema history. The analysis started by investigating the provided GitHub issue, but it did not contain direct commit links. The next step was to compare the git tags for the last vulnerable version (v0.5.4) and the first patched version (v0.5.5). This comparison revealed a commit 8d1851bee044423fb83eb9e636626b3003fe36c9 with the message "fix schema history security issue", confirming it as the security patch.
Analysis of this commit's changes showed that the History method in server/FormCMS/Cms/Services/SchemaService.cs was modified. Previously, the function fetched and returned data directly. The patch introduced a call to a new hook, hook.SchemaPostGetHistory.Trigger(...), before returning the data. This hook is used to implement the missing access control check. The vulnerable function is FormCMS.Cms.Services.SchemaService.History because it was the function that lacked the necessary security controls, and its modification was the direct fix for the vulnerability. During exploitation, this function would be on the call stack as it processes the malicious request.