The vulnerability is a missing authorization check in the oban_web LiveView component that handles job updates. The root cause lies in the handle_event function for the "save-job" event within the Oban.Web.Jobs.DetailComponent module. This function, introduced in commit a17bc8c, fails to validate whether the user has the necessary permissions to modify a job. It processes any received parameters and sends an asynchronous :update_job message to its parent LiveView, Oban.Web.JobsPage.
The handle_info function in the Oban.Web.JobsPage module receives this message and, trusting its origin, proceeds to update the job in the database using Oban.update_job/3. An attacker with only :read_only access can exploit this flaw by sending a crafted save-job event directly over the authenticated WebSocket. This bypasses any UI-level restrictions and allows them to change a job's properties, most critically the worker module, leading to a privilege escalation where their chosen worker is executed on the job's next run.
The patch in commit ab3c5d1 addresses the vulnerability by adding the necessary authorization check, can?(:update_jobs, @access), to the DetailComponent.handle_event function, ensuring that only privileged users can modify jobs.