sadovnik / reader

A simple feed reader app https://reader-app.herokuapp.com
2 stars 0 forks source link

🚨 [security] Update sidekiq: 5.2.5 → 6.2.2 (major) #300

Closed depfu[bot] closed 2 years ago

depfu[bot] commented 3 years ago

🚨 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?

✳️ sidekiq (5.2.5 → 6.2.2) · Repo · Changelog

Release Notes

Too many releases to show here. View the full release notes.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ connection_pool (indirect, 2.2.2 → 2.2.5) · Repo · Changelog

Release Notes

2.2.5 (from changelog)

  • Fix argument forwarding on Ruby 2.7 [#149]

2.2.4 (from changelog)

  • Add reload to close all connections, recreating them afterwards [Andrew Marshall, #140]
  • Add then as a way to use a pool or a bare connection with the same code path [#138]

2.2.3 (from changelog)

  • Pool now throws ConnectionPool::TimeoutError on timeout. [#130]
  • Use monotonic clock present in all modern Rubies [Tero Tasanen, #109]
  • Remove code hacks necessary for JRuby 1.7
  • Expose wrapped pool from ConnectionPool::Wrapper [Thomas Lecavelier, #113]

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by 47 commits:

↗️ rack (indirect, 2.0.6 → 2.2.3) · Repo · Changelog

Security Advisories 🚨

🚨 Percent-encoded cookies can be used to overwrite existing prefixed cookie names

It is possible to forge a secure or host-only cookie prefix in Rack using
an arbitrary cookie write by using URL encoding (percent-encoding) on the
name of the cookie. This could result in an application that is dependent on
this prefix to determine if a cookie is safe to process being manipulated
into processing an insecure or cross-origin request.
This vulnerability has been assigned the CVE identifier CVE-2020-8184.

Versions Affected: rack < 2.2.3, rack < 2.1.4
Not affected: Applications which do not rely on __Host- and __Secure- prefixes to determine if a cookie is safe to process
Fixed Versions: rack >= 2.2.3, rack >= 2.1.4

Impact

An attacker may be able to trick a vulnerable application into processing an
insecure (non-SSL) or cross-origin request if they can gain the ability to write
arbitrary cookies that are sent to the application.

Workarounds

If your application is impacted but you cannot upgrade to the released versions or apply
the provided patch, this issue can be temporarily addressed by adding the following workaround:

module Rack
  module Utils
    module_function def parse_cookies_header(header)
      return {} unless header
      header.split(/[;] */n).each_with_object({}) do |cookie, cookies|
        next if cookie.empty?
        key, value = cookie.split('=', 2)
        cookies[key] = (unescape(value) rescue value) unless cookies.key?(key)
      end
    end
  end
end

🚨 Percent-encoded cookies can be used to overwrite existing prefixed cookie names

It is possible to forge a secure or host-only cookie prefix in Rack using
an arbitrary cookie write by using URL encoding (percent-encoding) on the
name of the cookie. This could result in an application that is dependent on
this prefix to determine if a cookie is safe to process being manipulated
into processing an insecure or cross-origin request.
This vulnerability has been assigned the CVE identifier CVE-2020-8184.

Versions Affected: rack < 2.2.3, rack < 2.1.4
Not affected: Applications which do not rely on __Host- and __Secure- prefixes to determine if a cookie is safe to process
Fixed Versions: rack >= 2.2.3, rack >= 2.1.4

Impact

An attacker may be able to trick a vulnerable application into processing an
insecure (non-SSL) or cross-origin request if they can gain the ability to write
arbitrary cookies that are sent to the application.

Workarounds

If your application is impacted but you cannot upgrade to the released versions or apply
the provided patch, this issue can be temporarily addressed by adding the following workaround:

module Rack
  module Utils
    module_function def parse_cookies_header(header)
      return {} unless header
      header.split(/[;] */n).each_with_object({}) do |cookie, cookies|
        next if cookie.empty?
        key, value = cookie.split('=', 2)
        cookies[key] = (unescape(value) rescue value) unless cookies.key?(key)
      end
    end
  end
end

🚨 Directory traversal in Rack::Directory app bundled with Rack

There was a possible directory traversal vulnerability in the Rack::Directory app
that is bundled with Rack.

Versions Affected: rack < 2.2.0
Not affected: Applications that do not use Rack::Directory.
Fixed Versions: 2.1.3, >= 2.2.0

Impact

If certain directories exist in a director that is managed by
Rack::Directory, an attacker could, using this vulnerability, read the
contents of files on the server that were outside of the root specified in the
Rack::Directory initializer.

Workarounds

Until such time as the patch is applied or their Rack version is upgraded,
we recommend that developers do not use Rack::Directory in their
applications.

🚨 Directory traversal in Rack::Directory app bundled with Rack

There was a possible directory traversal vulnerability in the Rack::Directory app
that is bundled with Rack.

Versions Affected: rack < 2.2.0
Not affected: Applications that do not use Rack::Directory.
Fixed Versions: 2.1.3, >= 2.2.0

Impact

If certain directories exist in a director that is managed by
Rack::Directory, an attacker could, using this vulnerability, read the
contents of files on the server that were outside of the root specified in the
Rack::Directory initializer.

Workarounds

Until such time as the patch is applied or their Rack version is upgraded,
we recommend that developers do not use Rack::Directory in their
applications.

🚨 Possible information leak / session hijack vulnerability

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.

Release Notes

2.2.2 (from changelog)

Fixed

  • Fix incorrect Rack::Request#host value. (#1591, @ioquatix)
  • Revert Rack::Handler::Thin implementation. (#1583, @jeremyevans)
  • Double assignment is still needed to prevent an "unused variable" warning. (#1589, @kamipo)
  • Fix to handle same_site option for session pool. (#1587, @kamipo)

2.2.1 (from changelog)

Fixed

  • Rework Rack::Request#ip to handle empty forwarded_for. (#1577, @ioquatix)

2.2.0 (from changelog)

SPEC Changes

  • rack.session request environment entry must respond to to_hash and return unfrozen Hash. (@jeremyevans)
  • Request environment cannot be frozen. (@jeremyevans)
  • CGI values in the request environment with non-ASCII characters must use ASCII-8BIT encoding. (@jeremyevans)
  • Improve SPEC/lint relating to SERVER_NAME, SERVER_PORT and HTTP_HOST. (#1561, @ioquatix)

Added

  • rackup supports multiple -r options and will require all arguments. (@jeremyevans)
  • Server supports an array of paths to require for the :require option. (@khotta)
  • Files supports multipart range requests. (@fatkodima)
  • Multipart::UploadedFile supports an IO-like object instead of using the filesystem, using :filename and :io options. (@jeremyevans)
  • Multipart::UploadedFile supports keyword arguments :path, :content_type, and :binary in addition to positional arguments. (@jeremyevans)
  • Static supports a :cascade option for calling the app if there is no matching file. (@jeremyevans)
  • Session::Abstract::SessionHash#dig. (@jeremyevans)
  • Response.[] and MockResponse.[] for creating instances using status, headers, and body. (@ioquatix)
  • Convenient cache and content type methods for Rack::Response. (#1555, @ioquatix)

Changed

  • Request#params no longer rescues EOFError. (@jeremyevans)
  • Directory uses a streaming approach, significantly improving time to first byte for large directories. (@jeremyevans)
  • Directory no longer includes a Parent directory link in the root directory index. (@jeremyevans)
  • QueryParser#parse_nested_query uses original backtrace when reraising exception with new class. (@jeremyevans)
  • ConditionalGet follows RFC 7232 precedence if both If-None-Match and If-Modified-Since headers are provided. (@jeremyevans)
  • .ru files supports the frozen-string-literal magic comment. (@eregon)
  • Rely on autoload to load constants instead of requiring internal files, make sure to require 'rack' and not just 'rack/...'. (@jeremyevans)
  • Etag will continue sending ETag even if the response should not be cached. (@henm)
  • Request#host_with_port no longer includes a colon for a missing or empty port. (@AlexWayfer)
  • All handlers uses keywords arguments instead of an options hash argument. (@ioquatix)
  • Files handling of range requests no longer return a body that supports to_path, to ensure range requests are handled correctly. (@jeremyevans)
  • Multipart::Generator only includes Content-Length for files with paths, and Content-Disposition filename if the UploadedFile instance has one. (@jeremyevans)
  • Request#ssl? is true for the wss scheme (secure websockets). (@jeremyevans)
  • Rack::HeaderHash is memoized by default. (#1549, @ioquatix)
  • Rack::Directory allow directory traversal inside root directory. (#1417, @ThomasSevestre)
  • Sort encodings by server preference. (#1184, @ioquatix, @wjordan)
  • Rework host/hostname/authority implementation in Rack::Request. #host and #host_with_port have been changed to correctly return IPv6 addresses formatted with square brackets, as defined by RFC3986. (#1561, @ioquatix)
  • Rack::Builder parsing options on first #\ line is deprecated. (#1574, @ioquatix)

Removed

  • Directory#path as it was not used and always returned nil. (@jeremyevans)
  • BodyProxy#each as it was only needed to work around a bug in Ruby <1.9.3. (@jeremyevans)
  • URLMap::INFINITY and URLMap::NEGATIVE_INFINITY, in favor of Float::INFINITY. (@ch1c0t)
  • Deprecation of Rack::File. It will be deprecated again in rack 2.2 or 3.0. (@rafaelfranca)
  • Support for Ruby 2.2 as it is well past EOL. (@ioquatix)
  • Remove Rack::Files#response_body as the implementation was broken. (#1153, @ioquatix)
  • Remove SERVER_ADDR which was never part of the original SPEC. (#1573, @ioquatix)

Fixed

  • Directory correctly handles root paths containing glob metacharacters. (@jeremyevans)
  • Cascade uses a new response object for each call if initialized with no apps. (@jeremyevans)
  • BodyProxy correctly delegates keyword arguments to the body object on Ruby 2.7+. (@jeremyevans)
  • BodyProxy#method correctly handles methods delegated to the body object. (@jeremyevans)
  • Request#host and Request#host_with_port handle IPv6 addresses correctly. (@AlexWayfer)
  • Lint checks when response hijacking that rack.hijack is called with a valid object. (@jeremyevans)
  • Response#write correctly updates Content-Length if initialized with a body. (@jeremyevans)
  • CommonLogger includes SCRIPT_NAME when logging. (@Erol)
  • Utils.parse_nested_query correctly handles empty queries, using an empty instance of the params class instead of a hash. (@jeremyevans)
  • Directory correctly escapes paths in links. (@yous)
  • Request#delete_cookie and related Utils methods handle :domain and :path options in same call. (@jeremyevans)
  • Request#delete_cookie and related Utils methods do an exact match on :domain and :path options. (@jeremyevans)
  • Static no longer adds headers when a gzipped file request has a 304 response. (@chooh)
  • ContentLength sets Content-Length response header even for bodies not responding to to_ary. (@jeremyevans)
  • Thin handler supports options passed directly to Thin::Controllers::Controller. (@jeremyevans)
  • WEBrick handler no longer ignores :BindAddress option. (@jeremyevans)
  • ShowExceptions handles invalid POST data. (@jeremyevans)
  • Basic authentication requires a password, even if the password is empty. (@jeremyevans)
  • Lint checks response is array with 3 elements, per SPEC. (@jeremyevans)
  • Support for using :SSLEnable option when using WEBrick handler. (Gregor Melhorn)
  • Close response body after buffering it when buffering. (@ioquatix)
  • Only accept ; as delimiter when parsing cookies. (@mrageh)
  • Utils::HeaderHash#clear clears the name mapping as well. (@raxoft)
  • Support for passing nil Rack::Files.new, which notably fixes Rails' current ActiveStorage::FileServer implementation. (@ioquatix)

Documentation

2.1.2 (from changelog)

  • Fix multipart parser for some files to prevent denial of service (@aiomaster)
  • Fix Rack::Builder#use with keyword arguments (@kamipo)
  • Skip deflating in Rack::Deflater if Content-Length is 0 (@jeremyevans)
  • Remove SessionHash#transform_keys, no longer needed (@pavel)
  • Add to_hash to wrap Hash and Session classes (@oleh-demyanyuk)
  • Handle case where session id key is requested but missing (@jeremyevans)

2.1.1 (from changelog)

  • Remove Rack::Chunked from Rack::Server default middleware. (#1475, @ioquatix)
  • Restore support for code relying on SessionId#to_s. (@jeremyevans)

2.1.0 (from changelog)

Added

  • Add support for SameSite=None cookie value. (@hennikul)
  • Add trailer headers. (@eileencodes)
  • Add MIME Types for video streaming. (@styd)
  • Add MIME Type for WASM. (@buildrtech)
  • Add Early Hints(103) to status codes. (@egtra)
  • Add Too Early(425) to status codes. (@y-yagi)
  • Add Bandwidth Limit Exceeded(509) to status codes. (@CJKinni)
  • Add method for custom ip_filter. (@svcastaneda)
  • Add boot-time profiling capabilities to rackup. (@tenderlove)
  • Add multi mapping support for X-Accel-Mappings header. (@yoshuki)
  • Add sync: false option to Rack::Deflater. (Eric Wong)
  • Add Builder#freeze_app to freeze application and all middleware instances. (@jeremyevans)
  • Add API to extract cookies from Rack::MockResponse. (@petercline)

Changed

  • Don't propagate nil values from middleware. (@ioquatix)
  • Lazily initialize the response body and only buffer it if required. (@ioquatix)
  • Fix deflater zlib buffer errors on empty body part. (@felixbuenemann)
  • Set X-Accel-Redirect to percent-encoded path. (@diskkid)
  • Remove unnecessary buffer growing when parsing multipart. (@tainoe)
  • Expand the root path in Rack::Static upon initialization. (@rosenfeld)
  • Make ShowExceptions work with binary data. (@axyjo)
  • Use buffer string when parsing multipart requests. (@janko-m)
  • Support optional UTF-8 Byte Order Mark (BOM) in config.ru. (@mikegee)
  • Handle X-Forwarded-For with optional port. (@dpritchett)
  • Use Time#httpdate format for Expires, as proposed by RFC 7231. (@nanaya)
  • Make Utils.status_code raise an error when the status symbol is invalid instead of 500. (@adambutler)
  • Rename Request::SCHEME_WHITELIST to Request::ALLOWED_SCHEMES.
  • Make Multipart::Parser.get_filename accept files with + in their name. (@lucaskanashiro)
  • Add Falcon to the default handler fallbacks. (@ioquatix)
  • Update codebase to avoid string mutations in preparation for frozen_string_literals. (@pat)
  • Change MockRequest#env_for to rely on the input optionally responding to #size instead of #length. (@janko)
  • Rename Rack::File -> Rack::Files and add deprecation notice. (@postmodern).
  • Prefer Base64 “strict encoding” for Base64 cookies. (@ioquatix)

Removed

  • Remove to_ary from Response (@tenderlove)
  • Deprecate Rack::Session::Memcache in favor of Rack::Session::Dalli from dalli gem (@fatkodima)

Fixed

Documentation

  • Update broken example in Session::Abstract::ID documentation. (tonytonyjan)
  • Add Padrino to the list of frameworks implmenting Rack. (@wikimatze)
  • Remove Mongrel from the suggested server options in the help output. (@tricknotes)
  • Replace HISTORY.md and NEWS.md with CHANGELOG.md. (@twitnithegirl)
  • CHANGELOG updates. (@drenmi, @p8)

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 more commits than we can show here.

↗️ redis (indirect, 4.1.0 → 4.4.0) · Repo · Changelog

Release Notes

Too many releases to show here. View the full release notes.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

🗑️ rack-protection (removed)


Depfu Status

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)
depfu[bot] commented 2 years ago

Closed in favor of #307.