WeGIA is a web manager for charitable institutions. Prior to 3.9.1, web/controle/control.php authorizes FuncionarioControle requests only by checking whether an authenticated employee has a permission row for resource 11 or 91, while MiddlewareDAO::verificarPermissao() does not compare the stored id_acao value or authorize the requested method. An employee with any such permission and a valid CSRF token from the employee's own session can invoke FuncionarioControle::adicionarPermissao, FuncionarioControle::alterarPermissao, or FuncionarioControle::excluirPermissao to add, change, or remove permissions for arbitrary roles. This can grant higher action levels over sensitive resources, expose o