Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSubmit untrusted input to app
-
DeliveryApp mutates SafeBuffer in place (gsub!)
-
ExploitValue stored via MessagePack serializer
-
ExecutionDeserialized incorrectly as html_safe
-
PersistRendered in ERB without escaping
-
ImpactScript executes in victim browser
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires a specific, non-default combination documented by Rails: (1) the application runs Rails 8.1 (8.1.0.beta1 through 8.1.4.0) - Rails 8.0 and earlier do not serialize SafeBuffer via MessagePack and are NOT affected; (2) a MessagePack serializer is explicitly configured, i.e. config.action_dispatch.cookies_serializer = :message_pack or :message_pack_allow_marshal, or serializer: :message_pack for Rails.cache, ActiveSupport::MessageVerifier, or ActiveSupport::MessageEncryptor; (3) the application stores an ActiveSupport::SafeBuffer that was mutated in place (e.g. gsub!/sub!) so it is no longer html_safe?, where that buffer holds untrusted input; and (4) the loaded value is subsequently rendered in a view, requiring victim user interaction (UI:R) to trigger the XSS. Limiting factors: all of these application-specific conditions must coexist, which is why AC is High; the complete fix is upgrading to 8.1.4.1. The documented workaround for those who cannot upgrade is to convert the SafeBuffer to a String with to_str before storing it in a value a MessagePack serializer writes. |
| Impact | This is a moderate-severity, low-urgency issue, not a drop-everything emergency. The official CVSS 3.1 vector (AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N = 4.7) is internally consistent with the mechanism: network-reachable but high-complexity because exploitation depends on a specific, non-default serializer configuration AND an application coding pattern (in-place mutation of a SafeBuffer with untrusted input), plus user interaction (a victim must render the loaded value). No EPSS score was provided, so statistical exploitation probability cannot be stated. KEV status is not listed, so there is no confirmation of active exploitation; the vuln.today Decision label is 'this_month', indicating routine-patch urgency rather than act_now/emergency. No public exploit code is referenced - only the vendor commit, release, and GHSA advisory - though the flaw was responsibly reported by a HackerOne researcher (jcwilk). Net: a real but conditional stored-XSS escalation that matters only for the narrow set of Rails 8.1 apps using a MessagePack serializer and storing in-place-mutated SafeBuffers; treat it as a normal monthly patch, not a widespread-exploitation priority. |
| Exploit ScenarioDerived | A Rails 8.1 application is configured with a MessagePack serializer (e.g. cookies_serializer = :message_pack or Rails.cache serializer: :message_pack) and stores a SafeBuffer that was mutated in place (e.g. via gsub!) with attacker-supplied input, which drops its html_safe? status. When the value is deserialized it is incorrectly restored as html_safe, so later ERB rendering skips auto-escaping and the attacker's markup/script executes in the victim's browser. No public exploit code is identified at time of analysis; the issue was privately reported via HackerOne. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 11, 2026
Active Support's MessagePack serializer in Rails 8.1 (8.1.0.beta1 through 8.1.4.0) serializes an ActiveSupport::SafeBuffer as raw bytes only, so a buffer that was mutated in place and is no longer html_safe? is restored from the serialized payload as an html_safe SafeBuffer. When such a buffer held untrusted input and was written through a MessagePack serializer (cookies_serializer :message_pack or :message_pack_allow_marshal, or serializer: :message_pack for Rails.cache, MessageVerifier or MessageEncryptor), rendering the loaded value after a victim interaction bypasses ERB auto-escaping and can yield XSS. The flaw is rated CVSS 4.7 (AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N) and requires a non-default MessagePack serializer configuration plus an in-place-mutated unsafe buffer, so it is a moderate, low-urgency issue rather than a drop-everything emergency; no confirmed active exploitation (not in CISA KEV) and no public exploit code has been identified at time of analysis, and the vendor patch is available in 8.1.4.1.
RemediationAI
Vendor-released patch: upgrade the activesupport gem to 8.1.4.1 (Rails v8.1.4.1, https://github.com/rails/rails/releases/tag/v8.1.4.1), which is the complete fix; teams that cannot upgrade immediately can apply the backport patch for the 8.1 series at https://github.com/rails/rails/commit/4ca090665976e6fbc471c38689b399f84b43cdc7.patch. Because fixed releases mark unsafe buffers on the wire, plan the rollout: unfixed processes cannot read an unsafe buffer serialized by fixed ones, so during a rolling deploy a cookie or cache entry holding such a value may fail to load on a process that has not been upgraded - drain or upgrade consistently to avoid mixed-version deserialization errors. The documented workaround is to convert a SafeBuffer to a plain String with to_str before handing it to any value a MessagePack serializer writes, which removes the html_safe? bit the serializer would otherwise lose and re-apply; the trade-off is that this must be applied at every such write site, and any path that still stores a mutated SafeBuffer remains exposed. Applications that do not use a MessagePack serializer on Rails 8.1, and all applications on Rails 8.0 or earlier, do not need this change for this issue.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 2 packages in rubygems, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The vulnerability is a type/taint-confusion bug (CWE-79, cross-site scripting) inside ActiveSupport::MessagePack's extension layer (activesupport/lib/active_support/message_pack/extensions.rb). Rails registers a custom MessagePack extension type for ActiveSupport::SafeBuffer: on write it emitted only the buffer's bytes, and on read it unconditionally reconstructed a new ActiveSupport::SafeBuffer from those bytes, which by construction is html_safe. The serialized form therefore carried no representation of the html_safe? state, so a SafeBuffer that had been downgraded to unsafe in memory - the advisory's example is an in-place gsub! - came back from the round trip as trusted markup even though its content was untrusted. Because Action View's ERB output escaping trusts html_safe?, rendering the resurrected buffer emits attacker-influenced content unescaped. The upstream fix adds a marker byte when the buffer is not html_safe? and, on read, deserializes such values as plain String instead of SafeBuffer, while html_safe buffers keep the existing wire format; this is why a rolling deploy can hit load failures, since unfixed processes cannot read an unsafe buffer serialized by fixed ones. Rails 8.0 and earlier never serialize SafeBuffer through MessagePack, so their wire format and exposure are unchanged. The trigger requires the specific application-level preconditions documented by the vendor rather than a generic request pattern, which is why the assessed vector carries AC:H, UI:R and S:C.
Know when the next one hits your stack
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N
AC:H because a non-default MessagePack serializer plus an in-place-mutated SafeBuffer pattern are both required; PR:N as the attacker only supplies untrusted input; UI:R and S:C reflect XSS executing in the victim's browser.
Primary rating from Vendor (github).
CVSS VectorVendor: github
Lifecycle Timeline
2DescriptionCVE.org
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.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.
EUVD-2026-122911
GHSA-2w9f-fxwj-w2qf
NVD
CVE.org
EPSS
Exploit-DB