CVE-2026-126075

Active Support: Possible XSS vulnerability in Active Support MessagePack serializer

Published Nov 10, 2026 CVSS 3.1 · 4.7 Medium EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical impact

Active Support's MessagePack serializer restores SafeBuffer objects as html_safe even after mutation, allowing attacker-controlled HTML to bypass ERB auto-escaping when rendered, which can lead to cross-site scripting attacks.

Affected Systems

Rails 8.1 (vendor rails:rails) is affected from version 8.1.0 up to but not including 8.1.4.1. Applications that enable the MessagePack serializer—for example, via config.action_dispatch.cookies_serializer = :message_pack, :message_pack_allow_marshal, or serializer: :message_pack for Rails.cache, ActiveSupport::MessageVerifier, or ActiveSupport::MessageEncryptor—and store a SafeBuffer that has been mutated with untrusted input are vulnerable. Rails 8.0 and earlier are not affected.

Risk and Exploitability

The CVSS score of 4.7 suggests moderate risk, while the EPSS score of <1% indicates a low likelihood of exploitation. The vulnerability is not listed in CISA KEV. The likely attack vector is an attacker supplying untrusted input that is stored via a MessagePack serializer; upon deserialization the content is treated as html_safe and rendered without escaping. Successful exploitation requires that the application subsequently renders the restored string in an ERB template. Because the vector involves local mutation of SafeBuffer objects in application code or configuration, widespread remote exploitation appears limited, but the presence of such data in cookies, cache, sessions, or other serializable payloads could expose vulnerable sites if attackers control the input.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Rails to 8.1.4.1 or later
  • Change any MessagePack serializer configuration to a non-MessagePack type, such as :marshal or :json, for cookies, cache, or message verification/encryption
  • Ensure that SafeBuffer objects stored with MessagePack are not mutated with untrusted input; consider sanitizing or unsetting the html_safe flag before serialization

Generated by OpenCVE AI on November 13, 2026 at 15:10 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-2w9f-fxwj-w2qf Active Support: Possible XSS vulnerability in Active Support MessagePack serializer
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Rails
Rails rails
Vendors & Products Rails
Rails rails
Type Values Removed Values Added
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.
Title Active Support: Possible XSS vulnerability in Active Support MessagePack serializer
Weaknesses CWE-79
References
Metrics cvssV3_1

{'score': 4.7, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N'}

Weaknesses
  • CWE-79

    Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Nov 12, 2026, 7:04 PM
Reserved
Nov 10, 2026, 5:07 PM
Status
Awaiting Analysis
Published
Nov 10, 2026, 9:19 PM
Modified
Nov 12, 2026, 10:09 PM
Severity
Moderate
Public date
Nov 10, 2026, 8:50 PM