Skip to content

Commit 30c46a8

Browse files
jasnowRubySec CI
authored andcommitted
Updated advisory posts against rubysec/ruby-advisory-db@583ff06
1 parent 2c38ff8 commit 30c46a8

File tree

3 files changed

+205
-0
lines changed

3 files changed

+205
-0
lines changed
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
---
2+
layout: advisory
3+
title: 'CVE-2025-61780 (rack): Rack has a Possible Information Disclosure Vulnerability'
4+
comments: false
5+
categories:
6+
- rack
7+
advisory:
8+
gem: rack
9+
cve: 2025-61780
10+
ghsa: r657-rxjc-j557
11+
url: https://github.com/rack/rack/security/advisories/GHSA-r657-rxjc-j557
12+
title: Rack has a Possible Information Disclosure Vulnerability
13+
date: 2025-10-10
14+
description: |
15+
## Summary
16+
17+
A possible information disclosure vulnerability existed in
18+
`Rack::Sendfile` when running behind a proxy that supports
19+
`x-sendfile` headers (such as Nginx). Specially crafted headers
20+
could cause `Rack::Sendfile` to miscommunicate with the proxy and
21+
trigger unintended internal requests, potentially bypassing
22+
proxy-level access restrictions.
23+
24+
## Details
25+
26+
When `Rack::Sendfile` received untrusted `x-sendfile-type` or
27+
`x-accel-mapping` headers from a client, it would interpret them
28+
as proxy configuration directives. This could cause the middleware
29+
to send a "redirect" response to the proxy, prompting it to reissue
30+
a new internal request that was
31+
**not subject to the proxy's access controls**.
32+
33+
An attacker could exploit this by:
34+
1. Setting a crafted `x-sendfile-type: x-accel-redirect` header.
35+
2. Setting a crafted `x-accel-mapping` header.
36+
3. Requesting a path that qualifies for proxy-based acceleration.
37+
38+
## Impact
39+
40+
Attackers could bypass proxy-enforced restrictions and access internal
41+
endpoints intended to be protected (such as administrative pages).
42+
The vulnerability did not allow arbitrary file reads but could
43+
expose sensitive application routes.
44+
45+
This issue only affected systems meeting all of the following conditions:
46+
47+
* The application used `Rack::Sendfile` with a proxy that supports
48+
`x-accel-redirect` (e.g., Nginx).
49+
* The proxy did **not** always set or remove the `x-sendfile-type`
50+
and `x-accel-mapping` headers.
51+
* The application exposed an endpoint that returned a body
52+
responding to `.to_path`.
53+
54+
## Mitigation
55+
56+
* Upgrade to a fixed version of Rack which requires explicit
57+
configuration to enable `x-accel-redirect`:
58+
59+
```ruby
60+
use Rack::Sendfile, "x-accel-redirect"
61+
```
62+
63+
* Alternatively, configure the proxy to always set or strip
64+
the headers (you should be doing this!):
65+
66+
```nginx
67+
proxy_set_header x-sendfile-type x-accel-redirect;
68+
proxy_set_header x-accel-mapping /var/www/=/files/;
69+
```
70+
71+
* Or in Rails applications, disable sendfile completely:
72+
73+
```ruby
74+
config.action_dispatch.x_sendfile_header = nil
75+
```
76+
cvss_v3: 5.8
77+
patched_versions:
78+
- "~> 2.2.20"
79+
- "~> 3.1.18"
80+
- ">= 3.2.3"
81+
related:
82+
url:
83+
- https://github.com/rack/rack/security/advisories/GHSA-r657-rxjc-j557
84+
- https://github.com/rack/rack/commit/57277b7741581fa827472c5c666f6e6a33abd784
85+
- https://github.com/rack/rack/commit/7e69f65eefe9cd2868df9f9f3b0977b86f93523a
86+
- https://github.com/rack/rack/commit/fba2c8bc63eb787ff4b19bc612d315fda6126d85
87+
- https://github.com/advisories/GHSA-r657-rxjc-j557
88+
---
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
---
2+
layout: advisory
3+
title: 'CVE-2025-61919 (rack): Rack is vulnerable to a memory-exhaustion DoS through
4+
unbounded URL-encoded body parsing'
5+
comments: false
6+
categories:
7+
- rack
8+
advisory:
9+
gem: rack
10+
cve: 2025-61919
11+
ghsa: 6xw4-3v39-52mm
12+
url: https://github.com/rack/rack/security/advisories/GHSA-6xw4-3v39-52mm
13+
title: Rack is vulnerable to a memory-exhaustion DoS through unbounded URL-encoded
14+
body parsing
15+
date: 2025-10-10
16+
description: |
17+
## Summary
18+
19+
`Rack::Request#POST` reads the entire request body into memory for
20+
`Content-Type: application/x-www-form-urlencoded`, calling
21+
`rack.input.read(nil)` without enforcing a length or cap. Large
22+
request bodies can therefore be buffered completely into process
23+
memory before parsing, leading to denial of service (DoS) through
24+
memory exhaustion.
25+
26+
## Details
27+
28+
When handling non-multipart form submissions, Rack’s request
29+
parser performs:
30+
31+
```ruby
32+
form_vars = get_header(RACK_INPUT).read
33+
```
34+
35+
Since `read` is called with no argument, the entire request body is
36+
loaded into a Ruby `String`. This occurs before query parameter
37+
parsing or enforcement of any `params_limit`. As a result, Rack
38+
applications without an upstream body-size limit can experience
39+
unbounded memory allocation proportional to request size.
40+
41+
## Impact
42+
43+
Attackers can send large `application/x-www-form-urlencoded` bodies
44+
to consume process memory, causing slowdowns or termination by the
45+
operating system (OOM). The effect scales linearly with request
46+
size and concurrency. Even with parsing limits configured, the
47+
issue occurs *before* those limits are enforced.
48+
49+
## Mitigation
50+
51+
* Update to a patched version of Rack that enforces form parameter
52+
limits using `query_parser.bytesize_limit`, preventing unbounded
53+
reads of `application/x-www-form-urlencoded` bodies.
54+
* Enforce strict maximum body size at the proxy or web server layer
55+
(e.g., Nginx `client_max_body_size`, Apache `LimitRequestBody`).
56+
cvss_v3: 7.5
57+
patched_versions:
58+
- "~> 2.2.20"
59+
- "~> 3.1.18"
60+
- ">= 3.2.3"
61+
related:
62+
url:
63+
- https://github.com/rack/rack/security/advisories/GHSA-6xw4-3v39-52mm
64+
- https://github.com/rack/rack/commit/4e2c903991a790ee211a3021808ff4fd6fe82881
65+
- https://github.com/rack/rack/commit/cbd541e8a3d0c5830a3c9a30d3718ce2e124f9db
66+
- https://github.com/rack/rack/commit/e179614c4a653283286f5f046428cbb85f21146f
67+
- https://github.com/advisories/GHSA-6xw4-3v39-52mm
68+
---
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
layout: advisory
3+
title: 'CVE-2025-61921 (sinatra): Sinatra is vulnerable to ReDoS through ETag header
4+
value generation'
5+
comments: false
6+
categories:
7+
- sinatra
8+
advisory:
9+
gem: sinatra
10+
cve: 2025-61921
11+
ghsa: mr3q-g2mv-mr4q
12+
url: https://github.com/sinatra/sinatra/security/advisories/GHSA-mr3q-g2mv-mr4q
13+
title: Sinatra is vulnerable to ReDoS through ETag header value generation
14+
date: 2025-10-10
15+
description: |
16+
### Summary
17+
18+
There is a denial of service vulnerability in the `If-Match` and
19+
`If-None-Match` header parsing component of Sinatra, if the `etag`
20+
method is used when constructing the response and you are using Ruby < 3.2.
21+
22+
### Details
23+
24+
Carefully crafted input can cause `If-Match` and `If-None-Match`
25+
header parsing in Sinatra to take an unexpected amount of time,
26+
possibly resulting in a denial of service attack vector. This header
27+
is typically involved in generating the `ETag` header value. Any
28+
applications that use the `etag` method when generating a response
29+
are impacted if they are using Ruby below version 3.2.
30+
31+
### Resources
32+
33+
* https://github.com/sinatra/sinatra/issues/2120 (report)
34+
* https://github.com/sinatra/sinatra/pull/2121 (fix)
35+
* https://github.com/sinatra/sinatra/pull/1823 (older ReDoS vulnerability)
36+
* https://bugs.ruby-lang.org/issues/19104 (fix in Ruby >= 3.2)
37+
patched_versions:
38+
- ">= 4.2.0"
39+
related:
40+
url:
41+
- https://github.com/sinatra/sinatra/security/advisories/GHSA-mr3q-g2mv-mr4q
42+
- https://github.com/sinatra/sinatra/issues/2120
43+
- https://github.com/sinatra/sinatra/pull/1823
44+
- https://github.com/sinatra/sinatra/pull/2121
45+
- https://github.com/sinatra/sinatra/commit/3fe8c38dc405586f7ad8f2ac748aa53e9c3615bd
46+
- https://github.com/sinatra/sinatra/commit/8ff496bd4877520599e1479d6efead39304edceb
47+
- https://bugs.ruby-lang.org/issues/19104
48+
- https://github.com/advisories/GHSA-mr3q-g2mv-mr4q
49+
---

0 commit comments

Comments
 (0)