Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚨 [security] Update sinatra 2.2.0 → 3.2.0 (major) #312

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

depfu[bot]
Copy link
Contributor

@depfu depfu bot commented Dec 30, 2023


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

✳️ sinatra (2.2.0 → 3.2.0) · Repo · Changelog

Security Advisories 🚨

🚨 Sinatra vulnerable to Reflected File Download attack

An issue was discovered in Sinatra 2.0 before 2.2.3 and 3.0 before 3.0.4.
An application is vulnerable to a reflected file download (RFD) attack that
sets the Content-Disposition header of a response when the filename is
derived from user-supplied input.

🚨 Sinatra vulnerable to Reflected File Download attack

An issue was discovered in Sinatra 2.0 before 2.2.3 and 3.0 before 3.0.4.
An application is vulnerable to a reflected file download (RFD) attack that
sets the Content-Disposition header of a response when the filename is
derived from user-supplied input.

Release Notes

3.2.0 (from changelog)

  • New: Add #except method to Sinatra::IndifferentHash (#1940)

  • New: Use Exception#detailed_message to show backtrace (#1952)

  • New: Add Sinatra::HamlHelpers to sinatra-contrib (#1960)

  • Fix: Add base64 to rack-protection runtime dependencies (#1946)

  • Fix: Avoid open-ended dependencies for sinatra-contrib and rack-protection (#1949)

  • Fix: Helpful message when Sinatra::Runner times out (#1975)

  • Fix: Ruby 3.3 + Bundler 2.5 compatibility (#1975)

3.1.0 (from changelog)

  • New: Add sass support via sass-embedded #1911 by なつき

  • New: Add start and stop callbacks #1913 by Jevin Sew

  • New: Warn on dropping sessions #1900 by Jonathan del Strother

  • New: Make Puma the default server #1924 by Patrik Ragnarsson

  • Fix: Remove use of Tilt::Cache #1922 by Jeremy Evans (allows use of Tilt 2.2.0 without deprecation warning)

  • Fix: rack-protection: specify rack version requirement #1932 by Patrik Ragnarsson

3.0.6 (from changelog)

  • Fix: Add support to keep open streaming connections with Puma #1858 by Jordan Owens

  • Fix: Avoid crash in uri helper on Integer input #1890 by Patrik Ragnarsson

  • Fix: Rescue RuntimeError when trying to use SecureRandom #1888 by Stefan Sundin

3.0.5 (from changelog)

  • Fix: Add Zeitwerk compatibility. #1831 by Dawid Janczak

  • Fix: Allow CALLERS_TO_IGNORE to be overridden

3.0.4 (from changelog)

  • Fix: Escape filename in the Content-Disposition header. #1841 by Kunpei Sakai

3.0.3 (from changelog)

3.0.2 (from changelog)

  • New: Add Haml 6 support. #1820 by Jordan Owens

3.0.1 (from changelog)

  • Fix: Revert removal of rack-protection.rb. #1814 by Olle Jonsson

  • Fix: Revert change to server start and stop messaging by using Kernel#warn. Renamed internal warn method warn_for_deprecation. #1818 by Jordan Owens

3.0.0 (from changelog)

  • New: Add Falcon support. #1794 by Samuel Williams and @horaciob

  • New: Add AES GCM encryption support for session cookies. [#1324] (#1324) by Michael Coyne

  • Deprecated: Sinatra Reloader will be removed in the next major release.

  • Fix: Internal Sinatra errors now extend Sinatra::Error. This fixes #1204 and #1518. bda8c29d by Jordan Owens

  • Fix: Preserve query param value if named route param nil. #1676 by Jordan Owens

  • Require Ruby 2.6 as minimum Ruby version. #1699 by Eloy Pérez

  • Breaking change: Remove support for the Stylus template engine. #1697 by Eloy Pérez

  • Breaking change: Remove support for the erubis template engine. #1761 by Eloy Pérez

  • Breaking change: Remove support for the textile template engine. #1766 by Eloy Pérez

  • Breaking change: Remove support for SASS as a template engine. #1768 by Eloy Pérez

  • Breaking change: Remove support for Wlang as a template engine. #1780 by Eloy Pérez

  • Breaking change: Remove support for CoffeeScript as a template engine. #1790 by Eloy Pérez

  • Breaking change: Remove support for Mediawiki as a template engine. #1791 by Eloy Pérez

  • Breaking change: Remove support for Creole as a template engine. #1792 by Eloy Pérez

  • Breaking change: Remove support for Radius as a template engine. #1793 by Eloy Pérez

  • Breaking change: Remove support for the defunct Less templating library. See #1716, #1715 for more discussion and background. d1af2f1e by Olle Jonsson

  • Breaking change: Remove Reel integration. 54597502 by Olle Jonsson

  • CI: Start testing on Ruby 3.1. 60e221940 and b0fa4bef by Johannes Würbach

  • Use Kernel#caller_locations. #1491 by Julik Tarkhanov

  • Docs: Japanese documentation: Add notes about the default_content_type setting. #1650 by Akifumi Tominaga

  • Docs: Polish documentation: Add section about Multithreaded modes and Routes. #1708 by Patrick Gramatowski

  • Docs: Japanese documentation: Make Session section reflect changes done to README.md. #1731 by @shu-i-chi

2.2.3 (from changelog)

  • Fix: Escape filename in the Content-Disposition header. #1841 by Kunpei Sakai

  • Fix: fixed ReDoS for Rack::Protection::IPSpoofing. #1823 by @ooooooo-q

2.2.2 (from changelog)

  • Update mustermann dependency to version 2.

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.

✳️ rack (2.2.3 → 2.2.8) · Repo · Changelog

Security Advisories 🚨

🚨 Possible Denial of Service Vulnerability in Rack’s header parsing

There is a denial of service vulnerability in the header parsing component of Rack. This vulnerability has been assigned the CVE identifier CVE-2023-27539.

Versions Affected: >= 2.0.0 Not affected: None. Fixed Versions: 2.2.6.4, 3.0.6.1

Impact

Carefully crafted input can cause header parsing in Rack to take an unexpected amount of time, possibly resulting in a denial of service attack vector. Any applications that parse headers using Rack (virtually all Rails applications) are impacted.

Workarounds

Setting Regexp.timeout in Ruby 3.2 is a possible workaround.

🚨 Possible DoS Vulnerability in Multipart MIME parsing

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.

🚨 Denial of service via header parsing in Rack

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.

Versions Affected: >= 1.5.0
Not affected: None.
Fixed Versions: 2.0.9.2, 2.1.4.2, 2.2.6.2, 3.0.4.1

Impact

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.

Workarounds

There are no feasible workarounds for this issue.

🚨 Denial of service via multipart parsing in Rack

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.

Versions Affected: >= 2.0.0
Not affected: None.
Fixed Versions: 2.0.9.2, 2.1.4.2, 2.2.6.1, 3.0.4.1

Impact

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.

Workarounds

There are no feasible workarounds for this issue.

🚨 Denial of Service Vulnerability in Rack Content-Disposition parsing

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.

Versions Affected: >= 2.0.0
Not affected: None.
Fixed Versions: 2.0.9.2, 2.1.4.2, 2.2.6.1, 3.0.4.1

Impact

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.

Workarounds

There are no feasible workarounds for this issue.

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

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.

Workarounds

There are no feasible workarounds for this issue.

🚨 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

Or

use Rack::CommonLogger

All users running an affected release should either upgrade or use one of the
workarounds immediately.

Workarounds

Remove these middleware from your application

Release Notes

2.2.7

What's Changed

New Contributors

Full Changelog: v2.2.6.4...v2.2.7

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

Commits

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

↗️ mustermann (indirect, 1.1.1 → 3.0.0) · Repo

Commits

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

↗️ rack-protection (indirect, 2.2.0 → 3.2.0) · Repo · Changelog

Release Notes

3.2.0 (from changelog)

  • New: Add #except method to Sinatra::IndifferentHash (#1940)

  • New: Use Exception#detailed_message to show backtrace (#1952)

  • New: Add Sinatra::HamlHelpers to sinatra-contrib (#1960)

  • Fix: Add base64 to rack-protection runtime dependencies (#1946)

  • Fix: Avoid open-ended dependencies for sinatra-contrib and rack-protection (#1949)

  • Fix: Helpful message when Sinatra::Runner times out (#1975)

  • Fix: Ruby 3.3 + Bundler 2.5 compatibility (#1975)

3.1.0 (from changelog)

  • New: Add sass support via sass-embedded #1911 by なつき

  • New: Add start and stop callbacks #1913 by Jevin Sew

  • New: Warn on dropping sessions #1900 by Jonathan del Strother

  • New: Make Puma the default server #1924 by Patrik Ragnarsson

  • Fix: Remove use of Tilt::Cache #1922 by Jeremy Evans (allows use of Tilt 2.2.0 without deprecation warning)

  • Fix: rack-protection: specify rack version requirement #1932 by Patrik Ragnarsson

3.0.6 (from changelog)

  • Fix: Add support to keep open streaming connections with Puma #1858 by Jordan Owens

  • Fix: Avoid crash in uri helper on Integer input #1890 by Patrik Ragnarsson

  • Fix: Rescue RuntimeError when trying to use SecureRandom #1888 by Stefan Sundin

3.0.5 (from changelog)

  • Fix: Add Zeitwerk compatibility. #1831 by Dawid Janczak

  • Fix: Allow CALLERS_TO_IGNORE to be overridden

3.0.4 (from changelog)

  • Fix: Escape filename in the Content-Disposition header. #1841 by Kunpei Sakai

3.0.3 (from changelog)

3.0.2 (from changelog)

  • New: Add Haml 6 support. #1820 by Jordan Owens

3.0.1 (from changelog)

  • Fix: Revert removal of rack-protection.rb. #1814 by Olle Jonsson

  • Fix: Revert change to server start and stop messaging by using Kernel#warn. Renamed internal warn method warn_for_deprecation. #1818 by Jordan Owens

3.0.0 (from changelog)

  • New: Add Falcon support. #1794 by Samuel Williams and @horaciob

  • New: Add AES GCM encryption support for session cookies. [#1324] (#1324) by Michael Coyne

  • Deprecated: Sinatra Reloader will be removed in the next major release.

  • Fix: Internal Sinatra errors now extend Sinatra::Error. This fixes #1204 and #1518. bda8c29d by Jordan Owens

  • Fix: Preserve query param value if named route param nil. #1676 by Jordan Owens

  • Require Ruby 2.6 as minimum Ruby version. #1699 by Eloy Pérez

  • Breaking change: Remove support for the Stylus template engine. #1697 by Eloy Pérez

  • Breaking change: Remove support for the erubis template engine. #1761 by Eloy Pérez

  • Breaking change: Remove support for the textile template engine. #1766 by Eloy Pérez

  • Breaking change: Remove support for SASS as a template engine. #1768 by Eloy Pérez

  • Breaking change: Remove support for Wlang as a template engine. #1780 by Eloy Pérez

  • Breaking change: Remove support for CoffeeScript as a template engine. #1790 by Eloy Pérez

  • Breaking change: Remove support for Mediawiki as a template engine. #1791 by Eloy Pérez

  • Breaking change: Remove support for Creole as a template engine. #1792 by Eloy Pérez

  • Breaking change: Remove support for Radius as a template engine. #1793 by Eloy Pérez

  • Breaking change: Remove support for the defunct Less templating library. See #1716, #1715 for more discussion and background. d1af2f1e by Olle Jonsson

  • Breaking change: Remove Reel integration. 54597502 by Olle Jonsson

  • CI: Start testing on Ruby 3.1. 60e221940 and b0fa4bef by Johannes Würbach

  • Use Kernel#caller_locations. #1491 by Julik Tarkhanov

  • Docs: Japanese documentation: Add notes about the default_content_type setting. #1650 by Akifumi Tominaga

  • Docs: Polish documentation: Add section about Multithreaded modes and Routes. #1708 by Patrick Gramatowski

  • Docs: Japanese documentation: Make Session section reflect changes done to README.md. #1731 by @shu-i-chi

2.2.3 (from changelog)

  • Fix: Escape filename in the Content-Disposition header. #1841 by Kunpei Sakai

  • Fix: fixed ReDoS for Rack::Protection::IPSpoofing. #1823 by @ooooooo-q

2.2.2 (from changelog)

  • Update mustermann dependency to version 2.

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.

↗️ tilt (indirect, 2.0.10 → 2.3.0) · Repo · Changelog

Release Notes

2.1.0 (from changelog)

  • Use UnboundMethod#bind_call on Ruby 2.7+ for better performance (#380, jeremyevans)
  • Add Tilt::Template#freeze_string_literals? for freezing string literals in compiled templates (#301, jeremyevans)
  • Use Haml::Template for Tilt::HamlTemplate if available (Haml 6+) (#391, ntkme)
  • Deprecate BlueCloth, Less, and Sigil support (#382, jeremyevans)
  • Add Template#compiled_path accessor to save compiled template output to file (#369, jeremyevans)
  • Add Mapping#unregister to remove registered extensions (#376, jeremyevans)
  • Add Mapping#register_pipeline to register template pipelines (#259, jeremyevans)
  • Remove Tilt::Dummy (#364, jeremyevans)
  • Ensure Mapping#extensions_for returns unique values (#342, mojavelinux)
  • Remove opal support, since the the opal API changed (#374, jeremyevans)
  • Remove .livescript extension for LiveScript (#374, jeremyevans)
  • Set required_ruby_version in gemspec (#371, jeremyevans)

2.0.11 (from changelog)

  • Fix #extensions_for for RedcarpetTemplate (judofyr)
  • Support the new sass-embedded gem (#367, ntkme)
  • Add Tilt::EmacsOrg support (#366, hacktivista)
  • Improve rendering of BasicObject instances (#348, jeremyevans)
  • Fix Ruby 3.0 compatibility (#360, voxik)

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

🆕 base64 (added, 0.2.0)


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 cancel merge
Cancels automatic merging of this PR
@​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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants