Skip to content

🚨 [security] Update activesupport 8.1.3 → 8.1.4.1 (minor) - #223

Merged
depfu[bot] merged 1 commit into
mainfrom
depfu/update/activesupport-8.1.4.1
Nov 6, 2026
Merged

depfu[bot] merged 1 commit into
mainfrom
depfu/update/activesupport-8.1.4.1

Conversation

@depfu

@depfu depfu Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

🚨 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?

✳️ activesupport (8.1.3 → 8.1.4.1) · Repo · Changelog

Security Advisories 🚨

🚨 Possible XSS vulnerability in Active Support MessagePack serializer

Impact

ActiveSupport::MessagePack serializes an ActiveSupport::SafeBuffer as its
bytes alone and deserializes it as a new SafeBuffer, so a buffer that is no
longer html_safe? (for example, one mutated in place with gsub!) is
restored as html_safe. If such a buffer holds untrusted input and is stored
through a MessagePack serializer, rendering it after it is loaded bypasses ERB
auto-escaping, possibly leading to XSS.

Applications on Rails 8.1 are affected if they use a MessagePack serializer,
such as config.action_dispatch.cookies_serializer = :message_pack or
:message_pack_allow_marshal, or serializer: :message_pack for
Rails.cache, ActiveSupport::MessageVerifier or
ActiveSupport::MessageEncryptor, and store a SafeBuffer that was mutated
in place with untrusted input. Rails 8.0 and earlier do not serialize
SafeBuffer with MessagePack and are not affected.

Details

The fixed releases serialize a SafeBuffer that is not html_safe? with a
marker and deserialize it as a String; a SafeBuffer that is html_safe?
keeps the existing format. Versions without the fix cannot read an unsafe
buffer serialized by the fixed releases, so during a rolling deploy a cookie
or cache entry holding one could fail to load on a process that has not been
upgraded.

Workarounds

Applications that cannot upgrade can convert a SafeBuffer to a String with
to_str before storing it in a value that a MessagePack serializer writes.

Releases

The fixed releases are available at the normal locations.

Patches for those who cannot upgrade at once:

Credit

This issue was responsibly reported by HackerOne researcher
jcwilk.

🚨 Possible DoS vulnerability in Active Support safe_constantize

Impact

When constant lookup raises LoadError,
ActiveSupport::Inflector#safe_constantize (and String#safe_constantize)
builds a regular expression from the requested constant name without escaping
it, so a caller that passes untrusted input lets the attacker choose the
source of a pattern that the application compiles. Crafted patterns can
trigger defects in Ruby's regular expression compiler, possibly leading to a
crash of the server process, and repeated requests could keep the application
unavailable.

Action Cable passes the channel value of each subscribe command to
safe_constantize before any channel lookup, so in the default configuration
an unauthenticated client of the Action Cable endpoint can reach this code.

Details

The check that decides whether safe_constantize returns nil or re-raises
the LoadError now matches the first segment of the constant name against the
error message as a literal string, and no longer compiles a regular
expression. It returns the same result as before for constant names that
contain no regular expression syntax.

Affected applications

An application is affected if it meets all of these requirements:

  • Mounts Action Cable, which a new Rails application does by default at
    /cable (config.action_cable.mount_path), or otherwise passes untrusted
    input to safe_constantize.
  • Accepts Action Cable connections from untrusted clients.
    ApplicationCable::Connection#connect authenticates nobody unless the
    application adds a check.

Workarounds

Applications that do not use Action Cable can set
config.action_cable.mount_path = nil to remove the endpoint. Applications
that use Action Cable can call reject_unauthorized_connection in
ApplicationCable::Connection#connect for unauthenticated clients, which
limits exposure to authenticated users but does not remove it.

Releases

The fixed releases are available at the normal locations.

Patches for those who cannot upgrade at once:

Versions affected

  • activesupport < 8.0.5.2
  • activesupport >= 8.1, < 8.1.4.1

Credit

This issue was responsibly reported by Felix Tscheulin
(flixt) through HackerOne researcher
scheja, and independently by Bucky Wolfe
(Igneous), who provided a proof of concept that
crashes the server. It was also found by the Anthropic OSS Scanner
(ANT-2026-ZUN5KU3Q).

Commits

See the full diff on Github. The new version differs by 58 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)
Go to the Depfu Dashboard to see the state of your dependencies and to customize how Depfu works.

@depfu depfu Bot added the depfu label Nov 6, 2026
@depfu
depfu Bot merged commit 113438a into main Nov 6, 2026
3 checks passed
@depfu
depfu Bot deleted the depfu/update/activesupport-8.1.4.1 branch November 6, 2026 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants