Skip to content

Commit 11a4ed1

Browse files
committed
Sync with GitHub Security Advisories
* Add time/CVE-2023-28756 and unpoly-rails/CVE-2023-28846
1 parent 2f5d6fe commit 11a4ed1

File tree

2 files changed

+85
-0
lines changed

2 files changed

+85
-0
lines changed

gems/time/CVE-2023-28756.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
gem: time
3+
cve: 2023-28756
4+
ghsa: fg7x-g82r-94qc
5+
url: https://www.ruby-lang.org/en/news/2023/03/30/redos-in-time-cve-2023-28756/
6+
title: Ruby Time component ReDos issue
7+
date: 2023-03-31
8+
description: |
9+
A ReDoS issue was discovered in the Time component through 0.2.1 in Ruby
10+
through 3.2.1. The Time parser mishandles invalid URLs that have specific characters.
11+
It causes an increase in execution time for parsing strings to Time objects. The
12+
fixed versions are 0.1.1 and 0.2.2.
13+
patched_versions:
14+
- "~> 0.1.1"
15+
- ">= 0.2.2"
16+
related:
17+
url:
18+
- https://www.ruby-lang.org/en/news/2022/12/25/ruby-3-2-0-released/

gems/unpoly-rails/CVE-2023-28846.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
---
2+
gem: unpoly-rails
3+
cve: 2023-28846
4+
ghsa: m875-3xf6-mf78
5+
url: https://github.com/unpoly/unpoly-rails/security/advisories/GHSA-m875-3xf6-mf78
6+
title: unpoly-rails Denial of Service vulnerability
7+
date: 2023-03-30
8+
description: |
9+
There is a possible Denial of Service (DoS) vulnerability in the unpoly-rails
10+
gem that implements the [Unpoly server protocol](https://unpoly.com/up.protocol)
11+
for Rails applications.
12+
13+
### Impact
14+
15+
This issues affects Rails applications
16+
that operate as an upstream of a load balancer's that uses [passive health
17+
checks](https://docs.nginx.com/nginx/admin-guide/load-balancer/http-health-check/#passive-health-checks).
18+
19+
The [unpoly-rails](https://github.com/unpoly/unpoly-rails/) gem echoes the request URL
20+
as an `X-Up-Location` response header. By making a request with exceedingly long
21+
URLs (paths or query string), an attacker can cause unpoly-rails to write a exceedingly
22+
large response header.
23+
24+
If the response header is too large to be parsed by a load balancer downstream
25+
of the Rails application, it may cause the load balancer to remove the upstream
26+
from a load balancing group. This causes that application instance to become
27+
unavailable until a configured timeout is reached or until an active healthcheck
28+
succeeds.
29+
30+
### Workarounds
31+
32+
If you cannot upgrade to a fixed release, several workarounds are available:
33+
34+
- Configure your load balancer to
35+
use active health checks, e.g. by periodically requesting a route with a known response
36+
that indicates healthiness.
37+
- Configure your load balancer so the [maximum size
38+
of response headers](https://makandracards.com/operations/537537-nginx-proxy-buffer-tuning)
39+
is at least twice the [maximum size of a URL](https://tryhexadecimal.com/guides/http/414-request-uri-too-long).
40+
- Instead of changing your server configuration you may also configure your Rails
41+
application to delete redundant `X-Up-Location` headers set by unpoly-rails:
42+
43+
```ruby
44+
class ApplicationController < ActionController::Base
45+
46+
after_action :remove_redundant_up_location_header
47+
48+
private
49+
50+
def remove_redundant_up_location_header
51+
if request.original_url == response.headers['X-Up-Location']
52+
response.headers.delete('X-Up-Location')
53+
end
54+
end
55+
56+
end
57+
```
58+
cvss_v3: 5.9
59+
patched_versions:
60+
- ">= 2.7.2.2"
61+
related:
62+
url:
63+
- https://github.com/unpoly/unpoly-rails/commit/cd9ad0007daceeb3b2354fdcab4f88350427bf16
64+
- https://docs.nginx.com/nginx/admin-guide/load-balancer/http-health-check/#passive-health-checks
65+
- https://makandracards.com/operations/537537-nginx-proxy-buffer-tuning
66+
- https://tryhexadecimal.com/guides/http/414-request-uri-too-long
67+
- https://unpoly.com/up.protocol

0 commit comments

Comments
 (0)