Read the docs

Cross-site scripting in Active Support MessagePack serializer

Priority LOW 22CWE-79Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
Required
Attack complexity
High
Impact type
Cross-site scripting
Confidentiality · integrity · availability
Low · Low · None
Fix status
Fixed

Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-79.

Summary

Active Support, the utility library used by Rails and other Ruby projects, has a cross-site scripting flaw in ActiveSupport::MessagePack from 8.1 before 8.1.4.1. The serializer stores a SafeBuffer as bytes only, so a buffer that was mutated in place and is no longer html_safe is restored as html_safe, which is CWE-79. An unauthenticated remote attacker can exploit this through an application that stores untrusted input in such a buffer with a MessagePack serializer, if a user interacts with the rendered page. Rails 8.0 and earlier are not affected.

Written with Claude Haiku 5.5 from the sources below · 2026-11-11

Description from the CNA

Active Support is a collection of utility classes and standard library extensions used by Rails and other Ruby projects. From 8.1 until 8.1.4.1, 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. This issue is fixed in version 8.1.4.1.

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.00336 27th percentileScored 2026-11-16
Fix Fixed rails (rails): 8.1.4.1activesupport (RubyGems): 8.1.4.1

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
No
Technical impact
Partial

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
Railsrails8.1 to before 8.1.4.18.1.4.1Patch availableCNA
—activesupport (RubyGems)8.1.0.beta1 to before 8.1.4.18.1.4.1Patch availableGHSA-2w9f-fxwj-w2qf
  • rails VendorRails Affected 8.1 to before 8.1.4.1 Fixed in 8.1.4.1 Patch available CNA
  • activesupport (RubyGems) Vendor— Affected 8.1.0.beta1 to before 8.1.4.1 Fixed in 8.1.4.1 Patch available GHSA-2w9f-fxwj-w2qf

CPE names Threatist (inferred) · 1

Inferred from how NVD named this product before; not given by a source.

CPEVersionsRoleVendor
cpe:2.3:a:rubyonrails:rails:*:*:*:*:*:*:*:*——Rails
  • cpe:2.3:a:rubyonrails:rails:*:*:*:*:*:*:*:* Versions — — ·Rails

Remediation

Upgrade Rails and ActiveSupport to 8.1.4.1, which fixes the flaw. The sources list no fixed version for Rails 8.0 and earlier, since those versions are not affected.

Written with Claude Haiku 5.5 from the sources below · 2026-11-11

  • Fix · CNA rails (rails) Fixed in 8.1.4.1
  • Fix · GHSA-2w9f-fxwj-w2qf activesupport (RubyGems) Fixed in 8.1.4.1 Advisory →

Vendor assessments

Red Hat

Red Hat rating: Moderate. Red Hat's page for this CVE →

Not affected: 2 products
  • Red Hat 3scale API Management Platform 2
  • Red Hat Enterprise Linux 9

Timeline

  1. 2026-11-10 Threatist record created from CVE-2026-126075
  2. 2026-11-10 Alias added: GHSA-2w9f-fxwj-w2qf
  3. 2026-11-10 Fix available: RubyGems/[email protected] · GHSA-2w9f-fxwj-w2qf
  4. 2026-11-10 CVSS score added · GHSA-2w9f-fxwj-w2qf
  5. 2026-11-10 Weakness changed · GHSA-2w9f-fxwj-w2qf
  6. 2026-11-10 5 new references · GHSA-2w9f-fxwj-w2qf
  7. 2026-11-11 Affected versions changed · Red Hat
  8. 2026-11-11 CVSS score added · Red Hat
  9. 2026-11-12 CISA SSVC decision points changed

References

  • TI-2014-00124 Path traversal in Ruby on Rails lets remote attackers read files KEVCVSS 3.1HIGH 7.5
  • TI-2019-03828 File content disclosure in Rails Action View KEVCVSS 3.1HIGH 7.5
  • TI-2016-00672 Directory traversal in Rails Action View lets attackers read files KEVCVSS 3.1HIGH 7.5
  • TI-2019-03830 Command injection in Rails https://github.com/rails/rails CVSS 3.1CRITICAL 9.8
  • TI-2026-47043 Action Pack: Possible arbitrary file read and remote code execution in Active Storage variant processing CVSS 4.0CRITICAL 9.5
  • TI-2025-18040 Command injection in Rails activestorage CVSS 4.0CRITICAL 9.2
See all 185 →

Sources