Ruby/sinatra/2.0.1.rc1
Sinatra is a DSL for quickly creating web applications in Ruby with minimal effort.
https://rubygems.org/gems/sinatra
MIT
10 Security Vulnerabilities
Sinatra vulnerable to Reflected File Download attack
- https://github.com/sinatra/sinatra/security/advisories/GHSA-2x8x-jmrp-phxw
- https://nvd.nist.gov/vuln/detail/CVE-2022-45442
- https://github.com/sinatra/sinatra/commit/ea8fc9495a350f7551b39e3025bfcd06f49f363b
- https://github.com/advisories/GHSA-8x94-hmjh-97hq
- https://www.blackhat.com/docs/eu-14/materials/eu-14-Hafif-Reflected-File-Download-A-New-Web-Attack-Vector.pdf
- https://github.com/advisories/GHSA-2x8x-jmrp-phxw
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/sinatra/CVE-2022-45442.yml
- https://lists.debian.org/debian-lts-announce/2023/01/msg00005.html
Description
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.
References
- https://www.blackhat.com/docs/eu-14/materials/eu-14-Hafif-Reflected-File-Download-A-New-Web-Attack-Vector.pdf
- https://github.com/advisories/GHSA-8x94-hmjh-97hq
Sinatra Path Traversal vulnerability
An issue was discovered in rack-protection/lib/rack/protection/path_traversal.rb
in Sinatra 2.x before 2.0.1 on Windows. Path traversal is possible via backslash characters.
Sinatra vulnerable to Reliance on Untrusted Inputs in a Security Decision
- https://nvd.nist.gov/vuln/detail/CVE-2024-21510
- https://github.com/sinatra/sinatra/pull/2010
- https://security.snyk.io/vuln/SNYK-RUBY-SINATRA-6483832
- https://github.com/sinatra/sinatra/blob/b626e2d82c23b4fde0b51782fd32ca27ccde1d1a/lib/sinatra/base.rb#L319
- https://github.com/sinatra/sinatra/blob/b626e2d82c23b4fde0b51782fd32ca27ccde1d1a/lib/sinatra/base.rb#L323C1-L343C17
- https://github.com/advisories/GHSA-hxx2-7vcw-mqr3
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/sinatra/CVE-2024-21510.yml
- https://github.com/sinatra/sinatra/blob/main/CHANGELOG.md#410--2024-11-18
Versions of the package sinatra from 0.0.0 are vulnerable to Reliance on Untrusted Inputs in a Security Decision via the X-Forwarded-Host (XFH) header. When making a request to a method with redirect applied, it is possible to trigger an Open Redirect Attack by inserting an arbitrary address into this header. If used for caching purposes, such as with servers like Nginx, or as a reverse proxy, without handling the X-Forwarded-Host header, attackers can potentially exploit Cache Poisoning or Routing-based SSRF.
Sinatra Cross-site Scripting vulnerability
- https://nvd.nist.gov/vuln/detail/CVE-2018-11627
- https://github.com/advisories/GHSA-mq35-wqvf-r23c
- https://github.com/sinatra/sinatra/issues/1428
- https://github.com/sinatra/sinatra/commit/12786867d6faaceaec62c7c2cb5b0e2dc074d71a
- https://access.redhat.com/errata/RHSA-2019:0212
- https://access.redhat.com/errata/RHSA-2019:0315
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/sinatra/CVE-2018-11627.yml
Sinatra before 2.0.2 has XSS via the 400 Bad Request page that occurs upon a params parser exception.
sinatra does not validate expanded path matches
- https://nvd.nist.gov/vuln/detail/CVE-2022-29970
- https://github.com/sinatra/sinatra/pull/1683/commits/462c3ca1db53ed3cfc394cf5948e9c948ad1c10e
- https://github.com/skylightio/skylight-ruby/pull/294
- https://github.com/advisories/GHSA-qp49-3pvw-x4m5
- https://lists.debian.org/debian-lts-announce/2022/10/msg00034.html
- https://github.com/sinatra/sinatra/pull/1683
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/sinatra/CVE-2022-29970.yml
Sinatra before 2.2.0 does not validate that the expanded path matches public_dir when serving static files.
XSS via the 400 Bad Request page
Sinatra before 2.0.2 has XSS via the 400 Bad Request page that occurs upon a params parser exception.
sinatra ruby gem path traversal via backslash characters on Windows
An issue was discovered in rack-protection/lib/rack/protection/path_traversal.rb in Sinatra 2.x before 2.0.1 on Windows. Path traversal is possible via backslash characters.
sinatra does not validate expanded path matches
Sinatra before 2.2.0 does not validate that the expanded path matches public_dir when serving static files.
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 Reliance on Untrusted Inputs in a Security Decision
Versions of the package sinatra from 0.0.0 are vulnerable to Reliance on Untrusted Inputs in a Security Decision via the X-Forwarded-Host (XFH) header.
When making a request to a method with redirect applied, it is possible to trigger an Open Redirect Attack by inserting an arbitrary address into this header. If used for caching purposes, such as with servers like Nginx, or as a reverse proxy, without handling the X-Forwarded-Host header, attackers can potentially exploit Cache Poisoning or Routing-based SSRF.
106 Other Versions
Version | License | Security | Released | |
---|---|---|---|---|
4.1.1 | MIT | 2024-11-20 - 15:49 | 7 months | |
4.1.0 | MIT | 2024-11-18 - 11:33 | 8 months | |
4.0.1 | MIT | 2025-05-23 - 22:18 | about 1 month | |
4.0.0 | MIT | 2 | 2024-01-19 - 11:52 | over 1 year |
3.2.0 | MIT | 2 | 2023-12-29 - 17:56 | over 1 year |
3.1.0 | MIT | 2 | 2023-08-07 - 09:22 | almost 2 years |
3.0.6 | MIT | 2 | 2023-04-11 - 15:35 | about 2 years |
3.0.5 | MIT | 2 | 2022-12-16 - 23:13 | over 2 years |
3.0.4 | MIT | 2 | 2022-11-25 - 16:38 | over 2 years |
3.0.3 | MIT | 4 | 2022-11-11 - 19:42 | over 2 years |
3.0.2 | MIT | 4 | 2022-10-01 - 17:24 | almost 3 years |
3.0.1 | MIT | 4 | 2022-09-26 - 16:05 | almost 3 years |
3.0.0 | MIT | 4 | 2022-09-26 - 01:06 | almost 3 years |
2.2.4 | MIT | 2 | 2022-12-16 - 23:04 | over 2 years |
2.2.3 | MIT | 2 | 2022-11-25 - 20:30 | over 2 years |
2.2.2 | MIT | 3 | 2022-07-23 - 21:17 | almost 3 years |
2.2.1 | MIT | 3 | 2022-07-15 - 14:35 | almost 3 years |
2.2.0 | MIT | 3 | 2022-02-15 - 16:23 | over 3 years |
2.1.0 | MIT | 6 | 2020-09-04 - 18:51 | almost 5 years |
2.0.8.1 | MIT | 6 | 2020-01-01 - 20:06 | over 5 years |
2.0.8 | MIT | 6 | 2020-01-01 - 09:42 | over 5 years |
2.0.7 | MIT | 6 | 2019-08-22 - 10:04 | almost 6 years |
2.0.6 | MIT | 6 | 2019-08-21 - 17:01 | almost 6 years |
2.0.5 | MIT | 6 | 2018-12-22 - 11:11 | over 6 years |
2.0.4 | MIT | 6 | 2018-09-15 - 09:38 | almost 7 years |
2.0.3 | MIT | 6 | 2018-06-08 - 16:04 | about 7 years |
2.0.2 | MIT | 6 | 2018-06-05 - 16:54 | about 7 years |
2.0.1 | MIT | 8 | 2018-02-16 - 15:43 | over 7 years |
2.0.1.rc1 | MIT | 10 | 2018-02-13 - 11:12 | over 7 years |
2.0.0 | MIT | 10 | 2017-05-07 - 00:05 | about 8 years |
2.0.0.rc6 | MIT | 7 | 2017-05-06 - 23:59 | about 8 years |
2.0.0.rc5 | MIT | 7 | 2017-05-06 - 23:52 | about 8 years |
2.0.0.rc2 | MIT | 7 | 2017-03-19 - 03:34 | over 8 years |
2.0.0.rc1 | MIT | 7 | 2017-03-04 - 18:18 | over 8 years |
2.0.0.beta2 | MIT | 7 | 2016-08-22 - 17:01 | almost 9 years |
2.0.0.beta1 | MIT | 7 | 2016-08-22 - 15:17 | almost 9 years |
1.4.8 | MIT | 5 | 2017-01-30 - 03:31 | over 8 years |
1.4.7 | MIT | 5 | 2016-01-24 - 12:26 | over 9 years |
1.4.6 | MIT | 5 | 2015-03-24 - 02:42 | over 10 years |
1.4.5 | MIT | 5 | 2014-04-08 - 15:21 | about 11 years |
1.4.4 | UNKNOWN | 5 | 2013-10-21 - 10:12 | over 11 years |
1.4.3 | UNKNOWN | 5 | 2013-06-07 - 21:05 | about 12 years |
1.4.2 | UNKNOWN | 5 | 2013-03-21 - 09:08 | over 12 years |
1.4.1 | UNKNOWN | 5 | 2013-03-15 - 17:20 | over 12 years |
1.4.0 | UNKNOWN | 5 | 2013-03-15 - 11:28 | over 12 years |
1.4.0.c | UNKNOWN | 5 | 2013-02-26 - 23:19 | over 12 years |
1.4.0.d | UNKNOWN | 5 | 2013-03-09 - 17:17 | over 12 years |
1.4.0.b | UNKNOWN | 5 | 2013-02-26 - 13:58 | over 12 years |
1.4.0.a | UNKNOWN | 5 | 2013-02-26 - 07:01 | over 12 years |
1.3.6 | UNKNOWN | 5 | 2013-03-15 - 11:23 | over 12 years |