Skip to content

🚨 [security] [ruby] Update view_component 3.6.0 → 3.9.0 (minor)

Depfu Bot requested to merge depfu/update/view_component-3.9.0 into main

🚨 Your current dependencies have known security vulnerabilities 🚨

This dependency update fixes known security vulnerabilities. Please see the details below and assess their impact carefully. We recommend to merge and deploy this as soon as possible!


Here is everything you need to know about this update. Please take a good look at what changed and the test results before merging this pull request.

What changed?

️ view_component (3.6.0 → 3.9.0) · Repo · Changelog
Security Advisories 🚨

🚨 view_component Cross-site Scripting vulnerability

Impact

What kind of vulnerability is it? Who is impacted?

This is an XSS vulnerability that has the potential to impact
anyone rendering a component directly from a controller with the
view_component gem. Note that only components that define a
#call method
(i.e. instead of using a sidecar template) are affected. The return
value of the #call method is not sanitized and can include
user-defined content.

In addition, the return value of the
#output_postamble method
is not sanitized, which can also lead to XSS issues.

Patches

Has the problem been patched? What versions should users upgrade to?

Versions 3.9.0 has been released and fully mitigates both the
#call and the #output_postamble vulnerabilities.

Workarounds

Is there a way for users to fix or remediate the vulnerability
without upgrading?

Sanitize the return value of #call, eg:

class MyComponent < ApplicationComponent
  def call
    html_escape("<div>#{user_input}</div>")
  end
end

References

Are there any links users can visit to find out more?

#1950

For more information

If you have any questions or comments about this advisory:

Open an issue in the
github/view_component project.

Release Notes

3.7.0

  • Support Rails 7.1 in CI.

    Reegan Viljoen
    Cameron Dutro

  • Document the capture compatibility patch on the Known issues page.

    Simon Fish

  • Add Simundia to list of companies using ViewComponent.

    Alexandre Ignjatovic

  • Reduce UnboundMethod objects by memoizing initialize_parameters.

    Rainer Borene

  • Improve docs about inline templates interpolation.

    Hans Lemuet

  • Update generators.md to clarify the way of changing config.view_component.view_component_path.

    Shozo Hatta

  • Attempt to fix Ferrum timeout errors by creating driver with unique name.

    Cameron Dutro

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by 57 commits:


Depfu Status

Depfu will automatically keep this PR conflict-free, as long as you don't add any commits to this branch yourself. You can also trigger a rebase manually by commenting with @depfu rebase.

All Depfu comment commands
@​depfu rebase
Rebases against your default branch and redoes this update
@​depfu recreate
Recreates this PR, overwriting any edits that you've made to it
@​depfu merge
Merges this PR once your tests are passing and conflicts are resolved
@​depfu cancel merge
Cancels automatic merging of this PR
@​depfu close
Closes this PR and deletes the branch
@​depfu reopen
Restores the branch and reopens this PR (if it's closed)
@​depfu pause
Ignores all future updates for this dependency and closes this PR
@​depfu pause [minor|major]
Ignores all future minor/major updates for this dependency and closes this PR
@​depfu resume
Future versions of this dependency will create PRs again (leaves this PR as is)

Merge request reports