Cross-site scripting in Active Support MessagePack serializer
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
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
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| Rails | rails | 8.1 to before 8.1.4.1 | 8.1.4.1 | Patch available | CNA |
| — | activesupport (RubyGems) | 8.1.0.beta1 to before 8.1.4.1 | 8.1.4.1 | Patch available | GHSA-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
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
- 2026-11-10 Threatist record created from CVE-2026-126075
- 2026-11-10 Alias added: GHSA-2w9f-fxwj-w2qf
- 2026-11-10 Fix available: RubyGems/[email protected] · GHSA-2w9f-fxwj-w2qf
- 2026-11-10 CVSS score added · GHSA-2w9f-fxwj-w2qf
- 2026-11-10 Weakness changed · GHSA-2w9f-fxwj-w2qf
- 2026-11-10 5 new references · GHSA-2w9f-fxwj-w2qf
- 2026-11-11 Affected versions changed · Red Hat
- 2026-11-11 CVSS score added · Red Hat
- 2026-11-12 CISA SSVC decision points changed
References
Other 5
- https://github.com/rails/rails/security/advisories/GHSA-2w9f-fxwj-w2qf
- https://github.com/rails/rails/commit/4ca090665976e6fbc471c38689b399f84b43cdc7
- https://github.com/rails/rails/releases/tag/v8.1.4.1
- https://github.com/rails/rails
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/activesupport/GHSA-2w9f-fxwj-w2qf.yml
More Rails vulnerabilities
- 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
Sources
- CVE-2026-126075 · CVE Program
- CVE-2026-126075 · NVD
- FIRST EPSS
- GHSA-2w9f-fxwj-w2qf · GitHub Advisory Database · CC BY 4.0
- CVE-2026-126075 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences