chore(deps): update dependency phoenix_live_view to v1.2.14 [security] #701
No reviewers
Labels
No labels
bug
duplicate
enhancement
help wanted
high priority
invalid
L
low priority
M
medium priority
needs refinement
optional
question
S
security
technical improvement
UX Improvement
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
local-it/mitgliederverwaltung!701
Loading…
Reference in a new issue
No description provided.
Delete branch "renovate/hex-phoenix_live_view-vulnerability"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR contains the following updates:
1.2.13→1.2.14Joining a LiveView without
"url"skips itslive_sessionon_mounthooksCVE-2026-126334 / EEF-CVE-2026-126334 / GHSA-v4p7-3pm2-wq6c
More information
Details
Summary
Incorrect Authorization vulnerability in phoenixframework phoenix_live_view allows an authenticated user to mount a router-mounted LiveView without the
on_mounthooks of itslive_sessionvia aphx_joinmessage that carries neither a"url"nor a"redirect"key.The catch-all clause of the private
Phoenix.LiveView.Channel.authorize_session/3inlib/phoenix_live_view/channel.exaccepts a join without a URL for any session, including a root LiveView mounted at the router. The channel then mounts the LiveView with no route, and only a route adds thelive_sessionhooks to the mount lifecycle. Checks that those hooks perform on the connected mount do not run, and event checks that they attach throughattach_hook/4are never attached. The attacker needs a valid session token for the LiveView, which only the HTTP render issues, after the hooks pass there.on_mounthooks declared in the LiveView module still run.This issue affects phoenix_live_view: from 0.16.0 before 1.0.20, from 1.1.0-rc.0 before 1.1.34, and from 1.2.0-rc.0 before 1.2.14.
Details
1. Join authorization. The private
Phoenix.LiveView.Channel.authorize_session/3inlib/phoenix_live_view/channel.exhas three clauses. The"redirect"clause resolves the route and checks that it stays in the samelive_session. The"url"clause requires, for a session wherePhoenix.LiveView.Session.main?/1is true, that the route for the URL matches the view and thelive_sessionof the session. The third clause matches any other join parameters and returns the session with no route and no URL. Nested LiveViews need this clause because they have no URL. The clause does not callPhoenix.LiveView.Session.main?/1, so it also accepts a root LiveView that was mounted at the router.2. Mount with no route. With no route,
mount/3receives:not_mounted_at_routeras its params. The privateload_lifecycle/2adds theon_mounthooks of thelive_sessiononly when it receives a%Phoenix.LiveView.Route{}. Without a route it returns the lifecycle of the LiveView module alone. Thelive_sessionlayout is skipped in the same way.3. Result. The signed session token, the static token, the CSRF token, and the session cookie are all valid, so the join succeeds. The LiveView runs without the
live_sessionhooks. Hooks that halt the mount do not run, and hooks attached withattach_hook/4for:handle_eventor:handle_infoare never attached.Conditions that stop the mount. A LiveView that defines
handle_params/3raises on a mount without a route. A LiveView whosemount/3matches its params as a map raises. A LiveView that reads an assign that a skipped hook sets raises. In these cases the join fails.The official JavaScript client always sends
"url"or"redirect"for a root LiveView. Only nested views join without either key.Proof of concept
The target application has a
live_sessionwhoseon_mounthook halts the mount for a suspended account and attaches a:handle_eventhook withattach_hook/4that denies thedelete_postevent to users who are not admins. The LiveView at/postsdoes not definehandle_params/3./postsover HTTP. Keep the session cookie, the CSRF token from the page, and theid,data-phx-session, anddata-phx-staticattributes of the element that hasdata-phx-main./live/websocketwith the session cookie and the CSRF token.phx_joinmessage on the topiclv:<id>. The payload has"params"(with"_csrf_token"and"_mounts": 0),"session", and"static". It has no"url"key and no"redirect"key.ok. The LiveView is mounted without thelive_sessionhooks.eventmessage of typeclickfor the eventdelete_post. The LiveView handles the event, and the post is deleted.The same join with the
"url"key set to the page URL runs the hooks, and thedelete_postevent is denied. If the account is suspended after step 1, the join with"url"is refused, and the join without"url"still succeeds.Impact
An authenticated user can send events that the
live_sessionhooks would deny. A user whose access was revoked after the page loaded can still mount the LiveView and send events while the LiveView session token is valid.Workarounds
Move the security-relevant
on_mounthooks from thelive_sessionto the LiveView module withPhoenix.LiveView.on_mount/1, for example in thelive_viewdefinition thatuse MyAppWeb, :live_viewexpands. Hooks declared in the module run on every mount.Alternatively, make
mount/3match its first argument as a map (%{} = params), or definehandle_params/3in the LiveView. In both cases a mount without a route raises, and the join fails.Configurations
The application enforces authentication or authorization in
on_mounthooks of alive_session, and the LiveView does not do the same check itself. The LiveView must also mount without a route: it does not definehandle_params/3, itsmount/3accepts:not_mounted_at_routeras its params, and it does not read assigns that the skipped hooks set.Severity
CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:L/VI:H/VA:N/SC:N/SI:N/SA:NReferences
This data is provided by OSV.
Release Notes
phoenixframework/phoenix_live_view (phoenix_live_view)
v1.2.14Compare Source
Security fixes
urlskipping itslive_session'son_mounthooksBug fixes
Enhancements
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.