Active Support: Possible XSS vulnerability in Active Support MessagePack serializer
- State
- Published
- Severity
- 4.7 Medium
- Published
- Nov 10, 2026
- Updated
- Nov 12, 2026
- Reserved
- Nov 10, 2026
Description
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.
| Product | Versions |
|---|---|
| rails rails | >= 8.1, < 8.1.4.1 Affected |
| CVSS | Score | How It's Reached | Source |
|---|---|---|---|
| 3.1 | 4.7 Medium | GitHub_M |
Weaknesses
- CWE-79 Improper Neutralization of Input During Web Page Generation
References
Every record here comes from the CVE Program's CVE List. © 1999-2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.