[CVE-2024-28199] Cross-site Scripting (XSS) possible with maliciously formed HTML attribute names and values in Phlex #673
joeldrapper
started this conversation in
General
Replies: 1 comment 8 replies
-
tremendous job - and so great that you keep eyes on the ball 🙏 and I really hate to keep nagging - this time it's this "master" piece revolting with class Components::Navigation::Notification < Views::Components::Form::PhlexBase
include Phlex::Rails::Helpers::LinkTo
include Phlex::Rails::Helpers::TurboStreamFrom
def initialize( **attribs, &block )
@notifications = attribs[:notifications]
@user = attribs[:user] rescue false
@push_enabled = @user.receive_notifications ? true : false rescue false
@user_notifications_url = attribs[:user_notifications_url] || "#"
@present = attribs[:present] || 'all'
end
def template()
if @user && @user.can_view_notifications?
if @present == 'all'
all
else
notifications_list
end
else
div()
end
end
def all
debugger
turbo_stream_from [ @user, :notifications ] # <--- throws aforementioned error
div( data_controller: 'notifications',
...
end
end I let the debugger rip (in my efforts to not just sit there and bark but actively trying to chip in) and found myself here
at the exact moment in time and space My environment is: |
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We’ve just released Phlex 1.9.1, 1.8.2, 1.7.1, 1.6.2, 1.5.2, 1.4.1, 1.3.3, 1.2.2, 1.1.1, and 1.0.1 with important security fixes.
You can find more details about the vulnerability here. GHSA-242p-4v39-2v8g
I’m opening this discussion thread in case anyone has questions related to this vulnerability and how they can mitigate it. We patched all minor
1.x
versions, so you should be able to apply the fix without any breaking changes if you were previously running1.0.0
or greater. We’ve also patchedmain
for those of us living on the edge.You probably just need to run
bundle update phlex
. There are a couple of public PRs applying these patches for reference:If you have any trouble upgrading, please reach out here and we’ll try to help.
Beta Was this translation helpful? Give feedback.
All reactions