UBUNTU-CVE-2026-126073: Medium severity ubuntu/rails vulnerability
Action Pack is a framework for handling and responding to web requests. Prior to 8.1.4.1 and 8.0.5.2, 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#setvaryheader 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 expiresin ..., public: true) behind a shared cache that honours Vary, such as Thruster or Rack::Cache, are affected. This issue is fixed in versions 8.1.4.1 and 8.0.5.2.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
Action Packto a version that resolves this vulnerability.Fixed in 8.1.4.1 - Upgrade
Upgrade
Action Packto a version that resolves this vulnerability.Fixed in 8.0.5.2
Event History
Frequently Asked Questions
Which deployments are exposed to this issue?
Applications are affected when they render negotiated responses from public actions, mark those responses as publicly cacheable, and operate behind a shared cache that honors Vary, such as Thruster or Rack::Cache.
What does an attacker need to do, and what impact can they cause?
An attacker needs to cause a cacheable response to be stored following a request without an Accept header or an XHR request, or where the application already set a Vary header before rendering. They cannot choose the response content, but later visitors may receive the wrong cached representation, such as HTML without its layout or JSON in place of HTML, until the cache entry expires.
Which versions address the issue?
The issue is addressed in Action Pack 8.1.4.1 and 8.0.5.2. Versions earlier than those releases are affected under the relevant caching and response-negotiation conditions.