Skip to content
Putting technology to work.
Insights to guide decisions and action.

Search articles

Five fixes in Rack 3.2.9: stricter multipart boundaries

Table of contents · 6 items

Some sites and business systems built with Rails have forms for sending images or documents, or APIs that receive files from mobile apps or external systems. These submissions arrive in the multipart/form-data format, and a library under Rails called Rack parses their contents.

On November 20 (UTC), Rack released 3.2.9, 3.1.24 and 2.2.26. According to the changelog, 3.2.9 contains five security fixes, three of which relate to multipart parsing. Rack also changed how it reads the multipart boundary string so that it follows the HTTP specification (RFC 9110). Because of this change, requests that used to be accepted may cause errors after the update.

This article summarizes the five issues and which versions to update to, and shows what to check before updating.

The five issues

The "Security" section of the 3.2.9 changelog (CHANGELOG.md) lists the following five issues. Each has a GitHub advisory ID. The severity is the one assigned to the advisories published in the rack/rack repository (CVSS 3.1).

IDTargetSeverityChangelog description (summary)
GHSA-r243-pfwh-7rpxMultipart boundarylow(3.7)The boundary was extracted by partial matching instead of being parsed as a parameter, leading to parsing discrepancies and WAF bypass
GHSA-58mf-c3jj-277pMultipart charsethigh(7.5)The load path was searched for each unknown charset, a denial of service that exhausts the CPU
GHSA-mhj6-xc86-54m8Rack::Directorymedium(5.3)A .. after a symbolic link allowed listing directories outside the root
GHSA-frgv-948x-h96gMultipart Content-IDmedium(4.8)Folded Content-ID values were not unfolded, leaving line breaks (CRLF) in field names
GHSA-f7cc-57h7-qrcgRack::QueryParsermedium(5.3)About 48 bytes were allocated for each single space or square bracket after &, a denial of service that increases memory use

The five advisories were published in the rack/rack repository between 23:22 and 23:24 (UTC) on November 20. No CVE IDs have been assigned yet. As of November 24, they are listed neither in the GitHub Advisory Database (the global list) nor in ruby-advisory-db, which bundler-audit uses. Automated alerts based on these databases may not appear yet.

Based on the advisories and the fix commit descriptions, here are some additional details.

The charset issue (7c16c66) was caused by calling Encoding.find for each charset specification in text/plain parts without a file name. For an unknown name, Ruby searches the load path directories one by one. The description says "a request under 1 MB could keep a thread busy for tens of seconds", meaning a request under 1 MB could tie up a thread for tens of seconds. According to the advisory, Rails apps with default settings are affected even by POST requests to paths with no route. The 2.2 series is said not to be affected by this denial of service, because parsing stops at the first unknown charset.

The QueryParser issue (59fae90) was caused by splitting query strings and form bodies with /& */. According to the description, a 4 MiB body with spaces lined up after & allocated about 186 MB. That size is within the default limit (RACK_QUERY_PARSER_BYTESIZE_LIMIT). The allocation is temporary, but the description says that several such requests sent at once can exhaust the memory of a small container. With this fix, the DEFAULT_SEP in QueryParser and the & and ; values in COMMON_SEP changed from regular expressions to strings. If your own code uses these constants, check it as well.

The Rack::Directory issue (42af7a7) is limited to the directory listing feature. Apps that do not use Rack::Directory are not affected. The advisory gives as a typical example a setup that follows the Capistrano convention of making public/system and similar directories symbolic links to shared/. In that case, the names, sizes and modification times of files such as config/master.key under shared/ are visible. File contents are said not to be visible.

For the Content-ID issue (a08cec2), the advisory states: "The fix for CVE-2026-26962 was incomplete." The previously fixed problem of line breaks remaining in field names was still present through another path. In the 3.1 series, 3.1.16 and later are affected. The 2.2 series is affected in a different way: it accepts line breaks inside quoted values.

Boundary string handling changes

The behavior change from the update comes from the GHSA-r243 fix (c74dbad). The "Changed" section of the 3.2.9 changelog reads as follows.

The multipart Content-Type header is now parsed according to RFC 9110. An unquoted boundary containing characters outside the token grammar (such as =, /, :, ?, parentheses, or spaces), or parameters not separated by ;, now raise Rack::Multipart::Error instead of being accepted. Quoted boundaries are unaffected.

After the update, an unquoted boundary that contains =, /, :, ?, parentheses or spaces results in Rack::Multipart::Error. The same applies when parameters are not separated by ;. Quoted boundaries are not affected.

A diagram showing how Rack 3.2.9 changes the way multipart boundaries are read. Requests whose unquoted boundary uses only letters, digits and hyphens, and requests with a quoted boundary, are accepted both before and after the update. Requests whose unquoted boundary contains "=" or "/", and requests whose parameters are not separated by ";", result in Rack::Multipart::Error from 3.2.9 and 3.1.24. In 2.2.26 they result in EOFError

GHSA-r243 has the lowest severity of the five, low, but this is the fix that changes behavior. According to the advisory, Rack previously could read a different boundary than the WAF or reverse proxy in front of it. As a result, the content the WAF inspected and the content Rack received could differ, allowing inspection to be bypassed.

According to the commit description, this fix also drops handling of boundary* (the RFC 2231 format). The reason given is that the HTTP specification does not expect boundary* to be used for Content-Type, and neither browsers nor common HTTP components send it. However, requests that contain both boundary and boundary* are rejected with an error. This is because Go's mime.ParseMediaType reads boundary* first, and rejecting such requests prevents a front-end proxy or WAF and Rack from reading the boundary differently.

Separately, on November 21 a pull request (rack/rack #2565) was opened to restrict the contents of quoted boundaries to the RFC 2046 character range as well. As of November 24 it had not been merged and is not included in these releases.

For files sent from browser forms, the browser creates the boundary. The senders most likely to be affected are those that build the Content-Type value themselves.

  • APIs to which external systems send multipart bodies built with their own code
  • Mobile apps and internal batch jobs that still use old HTTP components
  • Test scripts that use a fixed, hand-picked boundary string

Where to update in each series

The versions published on RubyGems and their times (UTC) are as follows. In Japan time, this was the morning of November 21.

Release lineFixed versionPublicFixes included (of the five)
3.23.2.9November 20, 23:145
3.13.1.24November 20, 23:165
2.22.2.26November 20, 23:174 (the 2.2 series is not affected by the charset issue)

According to the changelog, 2.2.26 also tightens boundary handling in the same way, but the error is EOFError rather than Rack::Multipart::Error. If your code branches on the exception type, check it for each series. As of November 24, no newer releases have been published.

actionpack in Rails 8.1.4.1 and 8.0.5.2 requires rack ">= 2.2.4". You can update Rack alone without updating Rails. To update within the same series, use a constraint that prefers newer versions in the same series, such as bundle update rack --patch --conservative.

In addition, the Rails team's blog (This Week in Rails, November 20) says a change that patches Rack to ignore arbitrary multipart character encodings was added to Rails main and the 8.1 and 8.0 branches. As of November 24, the latest Rails on RubyGems is 8.1.4.1 (November 4), and no release containing this change has been published yet. It is separate from this Rack update.

Steps to check before updating (editorial suggestion)

  1. Check the version. Look at rack (x.y.z) in bundle exec gem list rack or Gemfile.lock. If it is below 3.2.9, 3.1.24 or 2.2.26, it needs updating.
  2. List the entry points that accept multipart. List the controllers and API endpoints that receive files. Separate those that receive requests only from browsers from those that receive them from external systems.
  3. Check the Content-Type of external senders. Check the format of the boundary= value from access logs or with the people responsible for the senders. If an unquoted value contains = or /, it will cause an error after the update. Ask the sender to fix it or to quote the value.
  4. Check acceptance in a test environment. Send requests from your usual senders to the updated test environment and confirm that the files are received.
  5. Monitor error logs. After releasing to production, watch for a while for any increase in Rack::Multipart::Error (EOFError in the 2.2 series).

Scope of verification

On November 24, 2026, we checked rack/rack's CHANGELOG.md (tags v3.2.9, v3.1.24 and v2.2.26); the descriptions and diffs of the fix commits in each tag (c74dbad, 7c16c66, 42af7a7, a08cec2, 59fae90 and others); the five advisories in the rack/rack repository via the GitHub API (severity, affected versions and details); the rack versions and release dates on RubyGems; the dependency constraints of actionpack 8.1.4.1 and 8.0.5.2; the latest rails version; and the rubyonrails.org blog post "Securing Rails" (November 20, 2026) (desk research). As of November 24, the five advisories are not listed in the GitHub Advisory Database or ruby-advisory-db. We have not reproduced the issues or checked whether requests are accepted before and after the update.

The fixes to Rails itself are covered in the article on Rails 8.1.4.1, Ruby's own October fixes in the article on Ruby regular expressions, and its November fixes in the article on Ruby 4.0.10. Rack, Rails and Ruby updates are landing around the same time, so planning verification for all of them together reduces rework.

GleamHub accepts consultations on development, AI and automation, including maintenance of sites and business systems built with Rails and verification of library updates. Please reach out via our contact form.

References

Share this articleXFacebook
Kakeru Suzuki

Fascinated by the possibilities of technology, has had a deep interest in programming and digital art since student days

Turn this article's theme into your company's next step

Concrete steps forward for your organization.

We organize your desired architecture, legacy systems, and operational requirements to formulate your next steps toward execution.

  • Desired architecture
  • Integration with existing environments
  • Operational requirements
Consult on development & operations initiatives

You can consult with us from the initial conceptual stage. Details from this article will be carried over to the inquiry form.

Receive the latest articles via email · Read the web production guide
Free download

Complete Guide to Web Production: Costs, Vendor Selection & Traffic Acquisition [2026 Edition]

We have compiled cost benchmarks, vendor selection criteria, and traffic acquisition strategies into a PDF.

The PDF and newsletter emails are currently in Japanese.

You will also be subscribed to our newsletter. You can unsubscribe at any time.