MEDIUM · CVSS 3.0 4.8 EPSS 0.5% · 45th percentile CWE-436

CVE-2026-126073: Action Pack: Possible cache poisoning in Action Pack content negotiation

Published 2026-11-10 · Updated 2026-11-10 · Also known as GHSA-r9jg-fmfx-2gv6

Summary

Action Pack fails to properly set the Vary header during content negotiation, potentially leading to cache poisoning where shared caches serve incorrect response formats to users. Users of RubyGems actionpack should update to the specified fixed versions to ensure proper cache header behavior.

Who is affected

This vulnerability affects applications using actionpack that render negotiated responses and mark them as public for shared caches, such as those using Thruster or Rack::Cache. When an application lacks the appropriate Vary headers, a shared cache may serve a response intended for one request type to subsequent users requesting different formats, potentially delivering partial or incorrectly formatted content. The attacker cannot manipulate the content of the response itself.

Exploitability

The vulnerability is rated as medium severity with a CVSS 3.0 score of 4.8, reflecting that exploitation requires specific conditions and a shared cache environment. With an EPSS score of 0.004, the likelihood of active exploitation is currently low, and it is not listed in the CISA Known Exploited Vulnerabilities catalog.

Remediation

How to check your project

Automated analysis of the published advisory data, generated 2026-11-18. Not human-reviewed; verify against the official advisory. How this works.

Affected packages

EcosystemPackageAffected versionsFixed inUpgrade
RubyGems actionpack >= 8.1, < 8.1.4.1 8.1.4.1 bundle update actionpack
RubyGems actionpack >= 0, < 8.0.5.2 8.0.5.2 bundle update actionpack

CVSS 3.0 vector

CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:L

Attack vectorNetwork
Attack complexityHigh
Privileges requiredNone
User interactionNone
ScopeUnchanged
ConfidentialityNone
IntegrityLow
AvailabilityLow

FAQ

Can an attacker control the content of the poisoned cache?

No, the attacker cannot choose the content of the response; they can only trigger a scenario where a shared cache misidentifies the correct format to serve.

What specifically triggers this issue?

The issue is triggered when Action Pack performs content negotiation based on headers like 'Accept' or 'X-Requested-With' but fails to properly inform shared caches to differentiate these responses via the 'Vary' header.

Is this vulnerability actively exploited?

Not documented. The CISA Known Exploited Vulnerabilities catalog indicates this is not currently a known exploited vulnerability.

Original advisory description
### Impact Action Pack negotiates the format of a rendered response from the `Accept`, `X-Requested-With` and, for XHR requests without `Accept`, `Content-Type` request headers, but `ActionController::Rendering#_set_vary_header` adds `Vary: Accept` only when the request carries a usable `Accept` header and the response has no `Vary` header yet. A response to a request without `Accept`, or to an XHR request, therefore omits the headers that selected its representation, and a response whose `Vary` the application set before rendering (for example `Vary: Accept-Language`) never gains `Accept`. A shared cache that honours `Vary` could store such a response and serve it to later clients that request a different representation, possibly leading to cache poisoning in which visitors receive, until the entry expires, a page without its layout or HTML in place of JSON. The attacker cannot choose the content of the response. Applications that render negotiated responses from actions marked `public` (for example with `expires_in ..., public: true`) behind a shared cache that honours `Vary`, such as Thruster or `Rack::Cache`, are affected. ### Details In the fixed releases, a rendered response whose format is not given by the URL lists `Accept` and `X-Requested-With` in `Vary`, and also `Content-Type` for an XHR request without `Accept`; when `config.action_dispatch.ignore_accept_header` is enabled, it lists only `X-Requested-With`. These fields are appended to an existing `Vary` value rather than skipped, and `Vary: *` is left unchanged. Shared caches can store more variants of such responses than before. See the Action Pack CHANGELOG for details. ### Workarounds Set `Vary: Accept, X-Requested-With` on negotiated responses in the application, for example in an `after_action`, or do not mark negotiated responses `public`. ### Releases The fixed releases are available at the normal locations. Patches for those who cannot upgrade at once: - 8.1: https://github.com/rails/rails/commit/7a955ca36779938267c93902c47d1f55bab99b4b.patch - 8.0: https://github.com/rails/rails/commit/b58c107abe9c1f10c1d6a4941402c60e4dc4742c.patch ### Credit This issue was found by the Anthropic OSS Scanner (ANT-2026-7GHGLQGO, ANT-2026-5MT6C2R3).

References

Source records: GHSA-r9jg-fmfx-2gv6 (OSV.dev) · EPSS by FIRST, 2026-11-24.