Ruby/actionpack/7.0.7
Web apps on Rails. Simple, battle-tested conventions for building and testing MVC web applications. Works with any Rack-compatible server.
https://rubygems.org/gems/actionpack
MIT
10 Security Vulnerabilities
Rails has possible XSS Vulnerability in Action Controller
- https://github.com/rails/rails/security/advisories/GHSA-9822-6m93-xqf4
- https://nvd.nist.gov/vuln/detail/CVE-2024-26143
- https://github.com/rails/rails/commit/4c83b331092a79d58e4adffe4be5f250fa5782cc
- https://github.com/rails/rails/commit/5187a9ef51980ad1b8e81945ebe0462d28f84f9e
- https://discuss.rubyonrails.org/t/possible-xss-vulnerability-in-action-controller/84947
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/actionpack/CVE-2024-26143.yml
- https://github.com/advisories/GHSA-9822-6m93-xqf4
- https://security.netapp.com/advisory/ntap-20240510-0004
Possible XSS Vulnerability in Action Controller
There is a possible XSS vulnerability when using the translation helpers
(translate
, t
, etc) in Action Controller. This vulnerability has been
assigned the CVE identifier CVE-2024-26143.
Versions Affected: >= 7.0.0. Not affected: < 7.0.0 Fixed Versions: 7.1.3.1, 7.0.8.1
Impact
Applications using translation methods like translate
, or t
on a
controller, with a key ending in _html
, a :default
key which contains
untrusted user input, and the resulting string is used in a view, may be
susceptible to an XSS vulnerability.
For example, impacted code will look something like this:
class ArticlesController < ApplicationController
def show
@message = t("message_html", default: untrusted_input)
# The `show` template displays the contents of `@message`
end
end
To reiterate the pre-conditions, applications must:
- Use a translation function from a controller (i.e. not I18n.t, or
t
from a view) - Use a key that ends in
_html
- Use a default value where the default value is untrusted and unescaped input
- Send the text to the victim (whether that's part of a template, or a
render
call)
All users running an affected release should either upgrade or use one of the workarounds immediately.
Releases
The fixed releases are available at the normal locations.
Workarounds
There are no feasible workarounds for this issue.
Patches
To aid users who aren't able to upgrade immediately we have provided patches for the two supported release series. They are in git-am format and consist of a single changeset.
- 7-0-translate-xss.patch - Patch for 7.0 series
- 7-1-translate-xss.patch - Patch for 7.1 series
Credits
Thanks to ooooooo_q for the patch and fix!
Missing security headers in Action Pack on non-HTML responses
- https://github.com/rails/rails/security/advisories/GHSA-fwhr-88qx-h9g7
- https://nvd.nist.gov/vuln/detail/CVE-2024-28103
- https://github.com/rails/rails/commit/35858f1d9d57f6c4050a8d9ab754bd5d088b4523
- https://github.com/advisories/GHSA-fwhr-88qx-h9g7
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/actionpack/CVE-2024-28103.yml
- https://security.netapp.com/advisory/ntap-20241206-0002
Permissions-Policy is Only Served on HTML Content-Type
The application configurable Permissions-Policy is only served on responses with an HTML related Content-Type.
This has been assigned the CVE identifier CVE-2024-28103.
Versions Affected: >= 6.1.0 Not affected: < 6.1.0 Fixed Versions: 6.1.7.8, 7.0.8.4, and 7.1.3.4
Impact
Responses with a non-HTML Content-Type are not serving the configured Permissions-Policy. There are certain non-HTML Content-Types that would benefit from having the Permissions-Policy enforced.
Releases
The fixed releases are available at the normal locations.
Workarounds
N/A
Patches
To aid users who aren't able to upgrade immediately we have provided patches for the supported release series in accordance with our maintenance policy regarding security issues. They are in git-am format and consist of a single changeset.
- 6-1-include-permissions-policy-header-on-non-html.patch - Patch for 6.1 series
- 7-0-include-permissions-policy-header-on-non-html.patch - Patch for 7.0 series
- 7-1-include-permissions-policy-header-on-non-html.patch - Patch for 7.1 series
Credits
Thank you shinkbr for reporting this!
Possible ReDoS vulnerability in HTTP Token authentication in Action Controller
There is a possible ReDoS vulnerability in Action Controller's HTTP Token authentication. This vulnerability has been assigned the CVE identifier CVE-2024-47887.
Impact
For applications using HTTP Token authentication via authenticate_or_request_with_http_token
or similar, a carefully crafted header may cause header parsing to take an unexpected amount of time, possibly resulting in a DoS vulnerability. All users running an affected release should either upgrade or apply the relevant patch immediately.
Ruby 3.2 has mitigations for this problem, so Rails applications using Ruby 3.2 or newer are unaffected. Rails 8.0.0.beta1 depends on Ruby 3.2 or greater so is unaffected.
Releases
The fixed releases are available at the normal locations.
Workarounds
Users on Ruby 3.2 are unaffected by this issue.
Credits
Thanks to scyoon for reporting
Possible Content Security Policy bypass in Action Dispatch
- https://github.com/rails/rails/security/advisories/GHSA-vfm5-rmrh-j26v
- https://github.com/advisories/GHSA-vfm5-rmrh-j26v
- https://nvd.nist.gov/vuln/detail/CVE-2024-54133
- https://github.com/rails/rails/commit/2e3f41e4538b9ca1044357f6644f037bbb7c6c49
- https://github.com/rails/rails/commit/3da2479cfe1e00177114b17e496213c40d286b3a
- https://github.com/rails/rails/commit/5558e72f22fc69c1c407b31ac5fb3b4ce087b542
- https://github.com/rails/rails/commit/cb16a3bb515b5d769f73926d9757270ace691f1d
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/actionpack/CVE-2024-54133.yml
- https://security.netapp.com/advisory/ntap-20250306-0010
There is a possible Cross Site Scripting (XSS) vulnerability in the content_security_policy
helper in Action Pack.
Impact
Applications which set Content-Security-Policy (CSP) headers dynamically from untrusted user input may be vulnerable to carefully crafted inputs being able to inject new directives into the CSP. This could lead to a bypass of the CSP and its protection against XSS and other attacks.
Releases
The fixed releases are available at the normal locations.
Workarounds
Applications can avoid setting CSP headers dynamically from untrusted input, or can validate/sanitize that input.
Credits
Thanks to ryotak for the report!
Possible ReDoS vulnerability in query parameter filtering in Action Dispatch
- https://github.com/rails/rails/security/advisories/GHSA-x76w-6vjr-8xgj
- https://github.com/advisories/GHSA-x76w-6vjr-8xgj
- https://nvd.nist.gov/vuln/detail/CVE-2024-41128
- https://github.com/rails/rails/commit/27121e80f6dbb260f5a9f0452cd8411cb681f075
- https://github.com/rails/rails/commit/b0fe99fa854ec8ff4498e75779b458392d1560ef
- https://github.com/rails/rails/commit/b1241f468d1b32235f438c2e2203386e6efd3891
- https://github.com/rails/rails/commit/fb493bebae1a9b83e494fe7edbf01f6167d606fd
- https://access.redhat.com/security/cve/cve-2024-41128
- https://bugzilla.redhat.com/show_bug.cgi?id=2319036
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/actionpack/CVE-2024-41128.yml
There is a possible ReDoS vulnerability in the query parameter filtering routines of Action Dispatch. This vulnerability has been assigned the CVE identifier CVE-2024-41128.
Impact
Carefully crafted query parameters can cause query parameter filtering to take an unexpected amount of time, possibly resulting in a DoS vulnerability. All users running an affected release should either upgrade or apply the relevant patch immediately.
Ruby 3.2 has mitigations for this problem, so Rails applications using Ruby 3.2 or newer are unaffected. Rails 8.0.0.beta1 depends on Ruby 3.2 or greater so is unaffected.
Releases
The fixed releases are available at the normal locations.
Workarounds
Users on Ruby 3.2 are unaffected by this issue.
Credits
Thanks to scyoon for the report and patches!
Possible XSS Vulnerability in Action Controller
There is a possible XSS vulnerability when using the translation helpers
(translate
, t
, etc) in Action Controller. This vulnerability has been
assigned the CVE identifier CVE-2024-26143.
Versions Affected: >= 7.0.0 Not affected: < 7.0.0 Fixed Versions: 7.1.3.1, 7.0.8.1
Impact
Applications using translation methods like translate
, or t
on a
controller, with a key ending in “_html”, a :default
key which contains
untrusted user input, and the resulting string is used in a view, may be
susceptible to an XSS vulnerability.
For example, impacted code will look something like this:
class ArticlesController < ApplicationController
def show
@message = t("message_html", default: untrusted_input)
# The `show` template displays the contents of `@message`
end
end
To reiterate the pre-conditions, applications must:
- Use a translation function from a controller (i.e. not
I18n.t
, ort
from a view) - Use a key that ends in
_html
- Use a default value where the default value is untrusted and unescaped input
- Send the text to the victim (whether that’s part of a template, or a
render
call)
All users running an affected release should either upgrade or use one of the workarounds immediately.
Releases
The fixed releases are available at the normal locations.
Workarounds
There are no feasible workarounds for this issue.
Missing security headers in Action Pack on non-HTML responses
Permissions-Policy is Only Served on HTML Content-Type
The application configurable Permissions-Policy is only served on responses with an HTML related Content-Type.
This has been assigned the CVE identifier CVE-2024-28103.
Versions Affected: >= 6.1.0 Not affected: < 6.1.0 Fixed Versions: 6.1.7.8, 7.0.8.4, and 7.1.3.4
Impact
Responses with a non-HTML Content-Type are not serving the configured Permissions-Policy. There are certain non-HTML Content-Types that would benefit from having the Permissions-Policy enforced.
Releases
The fixed releases are available at the normal locations.
Workarounds
N/A
Patches
To aid users who aren't able to upgrade immediately we have provided patches for the supported release series in accordance with our maintenance policy regarding security issues. They are in git-am format and consist of a single changeset.
- 6-1-include-permissions-policy-header-on-non-html.patch - Patch for 6.1 series
- 7-0-include-permissions-policy-header-on-non-html.patch - Patch for 7.0 series
- 7-1-include-permissions-policy-header-on-non-html.patch - Patch for 7.1 series
Credits
Thank you shinkbr for reporting this!
Possible ReDoS vulnerability in query parameter filtering in Action Dispatch
There is a possible ReDoS vulnerability in the query parameter filtering routines of Action Dispatch. This vulnerability has been assigned the CVE identifier CVE-2024-41128.
Impact
Carefully crafted query parameters can cause query parameter filtering to take an unexpected amount of time, possibly resulting in a DoS vulnerability. All users running an affected release should either upgrade or apply the relevant patch immediately.
Ruby 3.2 has mitigations for this problem, so Rails applications using Ruby 3.2 or newer are unaffected. Rails 8.0.0.beta1 depends on Ruby 3.2 or greater so is unaffected.
Releases
The fixed releases are available at the normal locations.
Workarounds
Users on Ruby 3.2 are unaffected by this issue.
Credits
Thanks to scyoon for the report and patches!
Possible ReDoS vulnerability in HTTP Token authentication in Action Controller
There is a possible ReDoS vulnerability in Action Controller's HTTP Token authentication. This vulnerability has been assigned the CVE identifier CVE-2024-47887.
Impact
For applications using HTTP Token authentication via
authenticate_or_request_with_http_token
or similar, a carefully
crafted header may cause header parsing to take an unexpected amount
of time, possibly resulting in a DoS vulnerability. All users running
an affected release should either upgrade or apply the relevant
patch immediately.
Ruby 3.2 has mitigations for this problem, so Rails applications using Ruby 3.2 or newer are unaffected. Rails 8.0.0.beta1 depends on Ruby 3.2 or greater so is unaffected.
Releases
The fixed releases are available at the normal locations.
Workarounds
Users on Ruby 3.2 are unaffected by this issue.
Credits
Thanks to scyoon for reporting
Possible Content Security Policy bypass in Action Dispatch
There is a possible Cross Site Scripting (XSS) vulnerability
in the content_security_policy
helper in Action Pack.
Impact
Applications which set Content-Security-Policy (CSP) headers dynamically from untrusted user input may be vulnerable to carefully crafted inputs being able to inject new directives into the CSP. This could lead to a bypass of the CSP and its protection against XSS and other attacks.
Releases
The fixed releases are available at the normal locations.
Workarounds
Applications can avoid setting CSP headers dynamically from untrusted input, or can validate/sanitize that input.
Credits
Thanks to ryotak for the report!
497 Other Versions
Version | License | Security | Released | |
---|---|---|---|---|
3.2.6 | UNKNOWN | 51 | 2012-06-12 - 21:24 | about 13 years |
3.2.5 | UNKNOWN | 53 | 2012-06-01 - 03:38 | about 13 years |
3.2.4 | UNKNOWN | 53 | 2012-05-31 - 18:23 | about 13 years |
3.2.4.rc1 | UNKNOWN | 55 | 2012-05-28 - 19:00 | about 13 years |
3.2.3 | UNKNOWN | 55 | 2012-03-30 - 22:25 | over 13 years |
3.2.3.rc2 | UNKNOWN | 55 | 2012-03-29 - 16:13 | over 13 years |
3.2.3.rc1 | UNKNOWN | 55 | 2012-03-27 - 17:10 | over 13 years |
3.2.2 | UNKNOWN | 55 | 2012-03-01 - 17:50 | over 13 years |
3.2.2.rc1 | UNKNOWN | 57 | 2012-02-22 - 21:37 | over 13 years |
3.2.1 | UNKNOWN | 57 | 2012-01-26 - 23:09 | over 13 years |
3.2.0 | UNKNOWN | 57 | 2012-01-20 - 16:47 | over 13 years |
3.2.0.rc2 | UNKNOWN | 47 | 2012-01-04 - 21:04 | over 13 years |
3.2.0.rc1 | UNKNOWN | 47 | 2011-12-20 - 00:40 | over 13 years |
3.1.12 | UNKNOWN | 50 | 2013-03-18 - 17:12 | over 12 years |
3.1.11 | UNKNOWN | 52 | 2013-02-11 - 18:16 | over 12 years |
3.1.10 | UNKNOWN | 52 | 2013-01-08 - 20:06 | over 12 years |
3.1.9 | UNKNOWN | 53 | 2013-01-02 - 21:18 | over 12 years |
3.1.8 | UNKNOWN | 53 | 2012-08-09 - 21:18 | almost 13 years |
3.1.7 | UNKNOWN | 55 | 2012-07-26 - 22:06 | almost 13 years |
3.1.6 | UNKNOWN | 56 | 2012-06-12 - 21:24 | about 13 years |
3.1.5 | UNKNOWN | 57 | 2012-05-31 - 18:23 | about 13 years |
3.1.5.rc1 | UNKNOWN | 58 | 2012-05-28 - 19:00 | about 13 years |
3.1.4 | UNKNOWN | 58 | 2012-03-01 - 17:50 | over 13 years |
3.1.4.rc1 | UNKNOWN | 59 | 2012-02-22 - 21:37 | over 13 years |
3.1.3 | UNKNOWN | 59 | 2011-11-20 - 22:51 | over 13 years |
3.1.2 | UNKNOWN | 59 | 2011-11-18 - 01:32 | over 13 years |
3.1.2.rc2 | UNKNOWN | 62 | 2011-11-14 - 15:48 | over 13 years |
3.1.2.rc1 | UNKNOWN | 62 | 2011-11-14 - 14:16 | over 13 years |
3.1.1 | UNKNOWN | 62 | 2011-10-07 - 15:28 | over 13 years |
3.1.1.rc3 | UNKNOWN | 62 | 2011-10-06 - 02:29 | over 13 years |
3.1.1.rc2 | UNKNOWN | 62 | 2011-09-29 - 22:15 | almost 14 years |
3.1.1.rc1 | UNKNOWN | 62 | 2011-09-15 - 00:24 | almost 14 years |
3.1.0 | UNKNOWN | 62 | 2011-08-31 - 02:17 | almost 14 years |
3.1.0.rc8 | UNKNOWN | 51 | 2011-08-29 - 03:25 | almost 14 years |
3.1.0.rc6 | UNKNOWN | 51 | 2011-08-16 - 22:32 | almost 14 years |
3.1.0.rc5 | UNKNOWN | 51 | 2011-07-25 - 23:04 | almost 14 years |
3.1.0.rc4 | UNKNOWN | 51 | 2011-06-09 - 22:55 | about 14 years |
3.1.0.rc3 | UNKNOWN | 51 | 2011-06-08 - 21:26 | about 14 years |
3.1.0.rc2 | UNKNOWN | 51 | 2011-06-08 - 00:14 | about 14 years |
3.1.0.rc1 | UNKNOWN | 51 | 2011-05-22 - 02:25 | about 14 years |
3.1.0.beta1 | UNKNOWN | 51 | 2011-05-05 - 01:22 | about 14 years |
3.0.20 | UNKNOWN | 53 | 2013-01-28 - 21:00 | over 12 years |
3.0.19 | UNKNOWN | 53 | 2013-01-08 - 20:06 | over 12 years |
3.0.18 | UNKNOWN | 54 | 2013-01-02 - 21:18 | over 12 years |
3.0.17 | UNKNOWN | 54 | 2012-08-09 - 21:15 | almost 13 years |
3.0.16 | UNKNOWN | 56 | 2012-07-26 - 22:06 | almost 13 years |
3.0.15 | UNKNOWN | 57 | 2012-06-13 - 03:06 | about 13 years |
3.0.14 | UNKNOWN | 57 | 2012-06-12 - 21:24 | about 13 years |
3.0.13 | UNKNOWN | 58 | 2012-05-31 - 18:23 | about 13 years |
3.0.13.rc1 | UNKNOWN | 58 | 2012-05-28 - 19:00 | about 13 years |