UBUNTU-CVE-2026-34831: Medium severity ubuntu/ruby-rack vulnerability

Published Apr 2, 2026
·
Updated

Rack is a modular Ruby web server interface. Prior to versions 2.2.23, 3.1.21, and 3.2.6, Rack::Files#fail sets the Content-Length response header using String#size instead of String#bytesize. When the response body contains multibyte UTF-8 characters, the declared Content-Length is smaller than the number of bytes actually sent on the wire. Because Rack::Files reflects the requested path in 404 responses, an attacker can trigger this mismatch by requesting a non-existent path containing percent-encoded UTF-8 characters. This results in incorrect HTTP response framing and may cause response desynchronization in deployments that rely on the incorrect Content-Length value. This issue has been patched in versions 2.2.23, 3.1.21, and 3.2.6.

Affected Software

4 affected componentsFixes available
ubuntu/ruby-rack<2.1.4-5ubuntu1.2+esm3
2.1.4-5ubuntu1.2+esm3
ubuntu/ruby-rack<2.2.7-1ubuntu0.7
2.2.7-1ubuntu0.7
ubuntu/ruby-rack<3.1.16-0.1ubuntu0.3
3.1.16-0.1ubuntu0.3
ubuntu/ruby-rack*

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade ubuntu/ruby-rack to a version that resolves this vulnerability.

    Fixed in 2.1.4-5ubuntu1.2+esm3
  2. Upgrade

    Upgrade ubuntu/ruby-rack to a version that resolves this vulnerability.

    Fixed in 2.2.7-1ubuntu0.7
  3. Upgrade

    Upgrade ubuntu/ruby-rack to a version that resolves this vulnerability.

    Fixed in 3.1.16-0.1ubuntu0.3
  4. Upgrade

    Upgrade Rack to a version that resolves this vulnerability.

    Fixed in 2.2.23
  5. Upgrade

    Upgrade Rack to a version that resolves this vulnerability.

    Fixed in 3.1.21
  6. Upgrade

    Upgrade Rack to a version that resolves this vulnerability.

    Fixed in 3.2.6

Event History

Apr 2, 2026
CVE Published
via OSV·05:16 PM
Data Sourced
via OSV·05:16 PM
DescriptionSeverityAffected Software

Frequently Asked Questions

1

Which Rack versions need to be updated?

Update Rack to 2.2.23, 3.1.21, or 3.2.6, as applicable to the deployed release line. Versions before those releases are affected.

2

What conditions are required to trigger the issue?

The application must use Rack::Files and return a 404 response for a requested path containing percent-encoded UTF-8 characters. An attacker does not need privileges or user interaction, but exploitation has high attack complexity.

3

Which deployments face the practical response-desynchronization risk?

The risk applies where incorrect Content-Length values can affect HTTP response framing, particularly deployments that rely on the declared header value. The mismatch occurs because the 404 response body can include multibyte characters reflected from the requested path.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203