🚨 Your current dependencies have known security vulnerabilities 🚨
This dependency update fixes known security vulnerabilities. Please see the details below and assess their impact carefully. We recommend to merge and deploy this as soon as possible!
Here is everything you need to know about this update. Please take a good look at what changed and the test results before merging this pull request.
There is a possible DoS vulnerability in the Multipart MIME parsing code in Rack. This vulnerability has been assigned the CVE identifier CVE-2023-27530.
Versions Affected: All. Not affected: None Fixed Versions: 3.0.4.2, 2.2.6.3, 2.1.4.3, 2.0.9.3
Impact
The Multipart MIME parsing code in Rack limits the number of file parts, but does not limit the total number of parts that can be uploaded. Carefully crafted requests can abuse this and cause multipart parsing to take longer than expected.
All users running an affected release should either upgrade or use one of the workarounds immediately.
Workarounds
A proxy can be configured to limit the POST body size which will mitigate this issue.
There is a denial of service vulnerability in the Content-Disposition parsing
component of Rack. This vulnerability has been assigned the CVE identifier CVE-2022-44571.
Carefully crafted input can cause Content-Disposition header parsing in Rack
to take an unexpected amount of time, possibly resulting in a denial of
service attack vector. This header is used typically used in multipart
parsing. Any applications that parse multipart posts using Rack (virtually
all Rails applications) are impacted.
There is a possible denial of service vulnerability in the Range header
parsing component of Rack. This vulnerability has been assigned the CVE
identifier CVE-2022-44570.
Carefully crafted input can cause the Range header parsing component in Rack
to take an unexpected amount of time, possibly resulting in a denial of
service attack vector. Any applications that deal with Range requests (such
as streaming applications, or applications that serve files) may be impacted.
There is a denial of service vulnerability in the multipart parsing component
of Rack. This vulnerability has been assigned the CVE identifier CVE-2022-44572.
Carefully crafted input can cause RFC2183 multipart boundary parsing in Rack
to take an unexpected amount of time, possibly resulting in a denial of
service attack vector. Any applications that parse multipart posts using
Rack (virtually all Rails applications) are impacted.
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
Or
use Rack::CommonLogger
All users running an affected release should either upgrade or use one of the
workarounds immediately.
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.
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)
But it also includes reading POST data from a Rack request object like this:
p request.POST # read POST data
p request.params # reads both query params and POST data
All users running an affected release should either upgrade or use one of the
workarounds immediately.
There's a possible information leak / session hijack vulnerability in Rack.
Attackers may be able to find and hijack sessions by using timing attacks
targeting the session id. Session ids are usually stored and indexed in a
database that uses some kind of scheme for speeding up lookups of that
session id. By carefully measuring the amount of time it takes to look up
a session, an attacker may be able to find a valid session id and hijack
the session.
The session id itself may be generated randomly, but the way the session is
indexed by the backing store does not use a secure comparison.
Impact:
The session id stored in a cookie is the same id that is used when querying
the backing session storage engine. Most storage mechanisms (for example a
database) use some sort of indexing in order to speed up the lookup of that
id. By carefully timing requests and session lookup failures, an attacker
may be able to perform a timing attack to determine an existing session id
and hijack that session.
There is a possible vulnerability in Rack. This vulnerability has been
assigned the CVE identifier CVE-2018-16471.
Versions Affected: All.
Not affected: None.
Fixed Versions: 2.0.6, 1.6.11
Impact
There is a possible XSS vulnerability in Rack. Carefully crafted requests can
impact the data returned by the scheme method on Rack::Request.
Applications that expect the scheme to be limited to "http" or "https" and do
not escape the return value could be vulnerable to an XSS attack.
Vulnerable code looks something like this:
<%= request.scheme.html_safe %>
Note that applications using the normal escaping mechanisms provided by Rails
may not impacted, but applications that bypass the escaping mechanisms, or do
not use them may be vulnerable.
All users running an affected release should either upgrade or use one of the
workarounds immediately.
Releases
The 2.0.6 and 1.6.11 releases are available at the normal locations.
Workarounds
The following monkey patch can be applied to work around this issue:
require "rack"
require "rack/request"
class Rack::Request
SCHEME_WHITELIST = %w(https http).freeze
def scheme
if get_header(Rack::HTTPS) == 'on'
'https'
elsif get_header(HTTP_X_FORWARDED_SSL) == 'on'
'https'
elsif forwarded_scheme
forwarded_scheme
else
get_header(Rack::RACK_URL_SCHEME)
end
end
def forwarded_scheme
scheme_headers = [
get_header(HTTP_X_FORWARDED_SCHEME),
get_header(HTTP_X_FORWARDED_PROTO).to_s.split(',')[0]
]
scheme_headers.each do |header|
return header if SCHEME_WHITELIST.include?(header)
end
nil
end
end
There is a possible DoS vulnerability in the multipart parser in Rack.
Carefully crafted requests can cause the multipart parser to enter a
pathological state, causing the parser to use CPU resources disproportionate to
the request size.
Impacted code can look something like this:
Rack::Request.new(env).params
But any code that uses the multi-part parser may be vulnerable.
Rack users that have manually adjusted the buffer size in the multipart parser
may be vulnerable as well.
All users running an affected release should either upgrade or use one of the
workarounds immediately.
Releases
The 2.0.6 release is available at the normal locations.
Workarounds
To work around this issue, the following code can be used:
Depfu will automatically keep this PR conflict-free, as long as you don't add any commits to this branch yourself. You can also trigger a rebase manually by commenting with @depfu rebase.
All Depfu comment commands
@depfu rebase
Rebases against your default branch and redoes this update
@depfu recreate
Recreates this PR, overwriting any edits that you've made to it
@depfu merge
Merges this PR once your tests are passing and conflicts are resolved
@depfu close
Closes this PR and deletes the branch
@depfu reopen
Restores the branch and reopens this PR (if it's closed)
@depfu pause
Ignores all future updates for this dependency and closes this PR
@depfu pause [minor|major]
Ignores all future minor/major updates for this dependency and closes this PR
@depfu resume
Future versions of this dependency will create PRs again (leaves this PR as is)
🚨 Your current dependencies have known security vulnerabilities 🚨
This dependency update fixes known security vulnerabilities. Please see the details below and assess their impact carefully. We recommend to merge and deploy this as soon as possible!
Here is everything you need to know about this update. Please take a good look at what changed and the test results before merging this pull request.
What changed?
↗️ rack (indirect, 2.0.5 → 2.0.9.3) · Repo · Changelog
Security Advisories 🚨
🚨 Possible DoS Vulnerability in Multipart MIME parsing
🚨 Denial of Service Vulnerability in Rack Content-Disposition parsing
🚨 Denial of service via header parsing in Rack
🚨 Denial of service via multipart parsing in Rack
🚨 Possible shell escape sequence injection vulnerability in Rack
🚨 Denial of Service Vulnerability in Rack Multipart Parsing
🚨 Possible information leak / session hijack vulnerability
🚨 Possible XSS vulnerability in Rack
🚨 Possible DoS vulnerability in Rack
Release Notes
2.0.8 (from changelog)
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 39 commits:
bump version
Limit all multipart parts, not just files
bumping version
Update changelog
Fix ReDoS vulnerability in multipart parser
Fix ReDoS in Rack::Utils.get_byte_ranges
Forbid control characters in attributes
update changelog
bump version
Escape untrusted text when logging
Restrict broken mime parsing
bump version
Handle case where session id key is requested but it is missing
Merge pull request #1455 from trainline-eu/2-0-stable
Merge pull request #1462 from jeremyevans/sessionid-to_s
Added support for SameSite=None cookie value, added in revision 3 of rfc6265bis
Bumping version
Introduce a new base class to avoid breaking when upgrading
Add a version prefix to the private id to make easier to migrate old values
Fallback to the public id when reading the session in the pool adapter
Also drop the session with the public id when destroying sessions
Fallback to the legacy id when the new id is not found
Add the private id
revert conditionals to master
remove NullSession
remove || raise and get closer to master
store hashed id, send public id
use session id objects
remove more nils
try to ensure we always have some kind of object
Bumping to 2.0.7 for release
Merge pull request #1343 from larsxschneider/ls/forward-fix
Preserve forwarded IP address for trusted proxy chains
Merge pull request #1201 from janko-m/make-multipart-parsing-work-for-chunked-requests
Bumping version for release
Whitelist http/https schemes
Reduce buffer size to avoid pathological parsing
Merge tag '2.0.5' into 2-0-stable
Merge pull request #1296 from tomelm/fix-prefers-plaintext
Depfu will automatically keep this PR conflict-free, as long as you don't add any commits to this branch yourself. You can also trigger a rebase manually by commenting with
@depfu rebase
.All Depfu comment commands