Skip to content

dep: [security] bump rack from 2.2.3 to 2.2.3.1

George Koltsov requested to merge dependabot-bundler-rack-2.2.3.1 into master

Bumps rack from 2.2.3 to 2.2.3.1. This update includes security fixes.

Vulnerabilities fixed

Denial of Service Vulnerability in Rack Multipart Parsing There is a possible denial of service vulnerability in the multipart parsing component of Rack. This vulnerability has been assigned the CVE identifier CVE-2022-30122.

Versions Affected: >= 1.2 Not affected: < 1.2 Fixed Versions: 2.0.9.1, 2.1.4.1, 2.2.3.1

Impact

Carefully crafted multipart POST requests can cause Rack's multipart parser to take much longer than expected, leading to a possible denial of service vulnerability.

Impacted code will use Rack's multipart parser to parse multipart posts. This includes directly using the multipart parser like this:

params = Rack::Multipart.parse_multipart(env)

... (truncated)

Patched versions: 2.2.3.1 Affected versions: >= 2.2, <= 2.2.3.0

Possible shell escape sequence injection vulnerability in Rack There is a possible shell escape sequence injection vulnerability in the Lint and CommonLogger components of Rack. This vulnerability has been assigned the CVE identifier CVE-2022-30123.

Versions Affected: All. Not affected: None Fixed Versions: 2.0.9.1, 2.1.4.1, 2.2.3.1

Impact

Carefully crafted requests can cause shell escape sequences to be written to the terminal via Rack's Lint middleware and CommonLogger middleware. These escape sequences can be leveraged to possibly execute commands in the victim's terminal.

Impacted applications will have either of these middleware installed, and vulnerable apps may have something like this:

use Rack::Lint

... (truncated)

Patched versions: 2.2.3.1 Affected versions: >= 2.2, <= 2.2.3.0

Changelog

Sourced from rack's changelog.

Changelog

All notable changes to this project will be documented in this file. For info on how to format all future additions to this file please reference Keep A Changelog.

[3.0.0] - Unreleased

Security

SPEC Changes

  • Response status must now be an integer greater than or equal to 100.
  • Response headers must now be an unfrozen hash.
  • Response header keys can no longer include uppercase characters.
  • Response header values can be an Array to handle multiple values (and no longer supports \n encoded headers).
  • Response body can now respond to #call (streaming body) instead of #each (enumerable body), for the equivalent of response hijacking in previous versions.
  • Middleware must no longer call #each on the body, but they can call #to_ary on the body if it responds to #to_ary.
  • rack.input is no longer required to be rewindable.
  • rack.multithread/rack.multiprocess/rack.run_once are no longer required environment keys.
  • SERVER_PROTOCOL is now a required key, matching the HTTP protocol used in the request.

Removed

  • Remove rack.multithread/rack.multiprocess/rack.run_once. These variables generally come too late to be useful. (#1720, [@​ioquatix], [@​jeremyevans]))
  • Remove deprecated Rack::Request::SCHEME_WHITELIST. ([@​jeremyevans])
  • Remove internal cookie deletion using pattern matching, there are very few practical cases where it would be useful and browsers handle it correctly without us doing anything special. (#1844, [@​ioquatix])

Added

  • Rack::Headers added to support lower-case header keys. ([@​jeremyevans])
  • Rack::Utils#set_cookie_header now supports escape_key: false to avoid key escaping. ([@​jeremyevans])
  • Rack::RewindableInput supports size. (@​ahorek)
  • Rack::RewindableInput::Middleware added for making rack.input rewindable. ([@​jeremyevans])
  • The RFC 7239 Forwarded header is now supported and considered by default when looking for information on forwarding, falling back to the X-Forwarded-* headers. Rack::Request.forwarded_priority accessor has been added for configuring the priority of which header to check. (#1423, [@​jeremyevans])
  • Allow response headers to contain array of values. (#1598, [@​ioquatix])

Changed

  • BREAKING CHANGE: Require status to be an Integer. (#1662, @​olleolleolle)
  • BREAKING CHANGE: Query parsing now treats parameters without = as having the empty string value instead of nil value, to conform to the URL spec. (#1696, [@​jeremyevans])
  • Relax validations around Rack::Request#host and Rack::Request#hostname. (#1606, @​pvande)
  • Removed antiquated handlers: FCGI, LSWS, SCGI, Thin. (#1658, [@​ioquatix])
  • Removed options from Rack::Builder.parse_file and Rack::Builder.load_file. (#1663, [@​ioquatix])
  • Rack::HTTP_VERSION has been removed and the HTTP_VERSION env setting is no longer set in the CGI and Webrick handlers. (#970, [@​jeremyevans])
  • Rack::Request#[] and #[]= now warn even in non-verbose mode. (#1277, [@​jeremyevans])
  • Decrease default allowed parameter recursion level from 100 to 32. (#1640, [@​jeremyevans])
  • Attempting to parse a multipart response with an empty body now raises Rack::Multipart::EmptyContentError. (#1603, [@​jeremyevans])
  • Rack::Utils.secure_compare uses OpenSSL's faster implementation if available. (#1711, @​bdewater)
  • Rack::Request#POST now caches an empty hash if input content type is not parseable. (#749, [@​jeremyevans])

... (truncated)

Commits


Dependabot commands
You can trigger Dependabot actions by commenting on this MR
  • @dependabot-bot rebase will rebase this MR
  • @dependabot-bot recreate will recreate this MR rewriting all the manual changes and resolving conflicts

Allure report

allure-report-publisher generated test report!

rspec: test report for 2846bd65

+------------------------------------------------------------------+
|                        behaviors summary                         |
+-------------+--------+--------+---------+-------+-------+--------+
|             | passed | failed | skipped | flaky | total | result |
+-------------+--------+--------+---------+-------+-------+--------+
| services    | 170    | 0      | 0       | 0     | 170   | ✅     |
| jobs        | 14     | 0      | 0       | 0     | 14    | ✅     |
| controllers | 25     | 0      | 0       | 0     | 25    | ✅     |
| system      | 10     | 0      | 0       | 0     | 10    | ✅     |
| models      | 3      | 0      | 0       | 0     | 3     | ✅     |
| tasks       | 8      | 0      | 0       | 0     | 8     | ✅     |
+-------------+--------+--------+---------+-------+-------+--------+
| Total       | 230    | 0      | 0       | 0     | 230   | ✅     |
+-------------+--------+--------+---------+-------+-------+--------+
Edited by George Koltsov

Merge request reports