-
-
Notifications
You must be signed in to change notification settings - Fork 219
/
CVE-2022-23633.yml
61 lines (51 loc) · 1.83 KB
/
CVE-2022-23633.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
---
gem: actionpack
framework: rails
cve: 2022-23633
ghsa: wh98-p28r-vrc9
url: https://groups.google.com/g/ruby-security-ann/c/FkTM-_7zSNA/m/K2RiMJBlBAAJ
title: Possible exposure of information vulnerability in Action Pack
date: 2022-02-11
description: |
## Impact
Under certain circumstances response bodies will not be closed, for example a
bug in a webserver (https://github.com/puma/puma/pull/2812) or a bug in a Rack
middleware. In the event a response is not notified of a `close`,
`ActionDispatch::Executor` will not know to reset thread local state for the
next request. This can lead to data being leaked to subsequent requests,
especially when interacting with `ActiveSupport::CurrentAttributes`.
Upgrading to the FIXED versions of Rails will ensure mitigation if this issue
even in the context of a buggy webserver or middleware implementation.
## Patches
This has been fixed in Rails 7.0.2.2, 6.1.4.6, 6.0.4.6, and 5.2.6.2.
## Workarounds
Upgrading is highly recommended, but to work around this problem the following
middleware can be used:
```
class GuardedExecutor < ActionDispatch::Executor
def call(env)
ensure_completed!
super
end
private
def ensure_completed!
@executor.new.complete! if @executor.active?
end
end
# Ensure the guard is inserted before ActionDispatch::Executor
Rails.application.configure do
config.middleware.swap ActionDispatch::Executor, GuardedExecutor, executor
end
```
cvss_v3: 7.4
unaffected_versions:
- "< 5.0.0"
patched_versions:
- "~> 5.2.6, >= 5.2.6.2"
- "~> 6.0.4, >= 6.0.4.6"
- "~> 6.1.4, >= 6.1.4.6"
- ">= 7.0.2.2"
related:
url:
- https://github.com/rails/rails/commit/10c64a472f2f19a5e485bdac7d5106a76aeb29a5
- https://github.com/rails/rails/blob/7-0-stable/actionpack/CHANGELOG.md#rails-7021-february-11-2022