CVE-2024-26143
Rails Possible XSS Vulnerability in Action Controller
Rails is a web-application framework. There is a possible XSS vulnerability when using the translation helpers in Action Controller. 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. The vulnerability is fixed in 7.1.3.1 and 7.0.8.1.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- Required
What an attacker can affect
- Confidentiality
- Low
- Integrity
- Low
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
6.1
Rails Possible XSS Vulnerability in Action Controller
Rails is a web-application framework. There is a possible XSS vulnerability when using the translation helpers in Action Controller. 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. The vulnerability is fixed in 7.1.3.1 and 7.0.8.1.
- Record
CVE-2024-26143- CVSS 3.1
- 6.1 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N - Weakness
- CWE-79
- Updated
- 2026-11-02
EUVDEUVD-2024-0589
6.1
Rails is a web-application framework. There is a possible XSS vulnerability when using the translation helpers in Action Controller. 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. The vulnerability is fixed in 7.1.3.1 and 7.0.8.1.
- Record
EUVD-2024-0589- CVSS 3.1
- 6.1 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N - Updated
- 2026-11-03
GitHub AdvisoriesGHSA-9822-6m93-xqf4
6.1
Rails has possible XSS Vulnerability in Action Controller
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
tfrom 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
rendercall)
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!
- Record
GHSA-9822-6m93-xqf4- CVSS 3.1
- 6.1 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N - Weakness
- CWE-79
- Updated
- 2026-11-02
NVD
6.1
Rails is a web-application framework. There is a possible XSS vulnerability when using the translation helpers in Action Controller. 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. The vulnerability is fixed in 7.1.3.1 and 7.0.8.1.
- Record
CVE-2024-26143- CVSS 3.1
- 6.1 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N - Weakness
- CWE-79
- Updated
- 2026-11-02
OSV
6.1
Rails Possible XSS Vulnerability in Action Controller
Rails is a web-application framework. There is a possible XSS vulnerability when using the translation helpers in Action Controller. 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. The vulnerability is fixed in 7.1.3.1 and 7.0.8.1.
- Record
CVE-2024-26143- CVSS 3.1
- 6.1 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N - Weakness
- CWE-79
- Updated
- 2026-11-02
OSVGHSA-9822-6m93-xqf4
6.1
Rails has possible XSS Vulnerability in Action Controller
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
tfrom 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
rendercall)
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!
- Record
GHSA-9822-6m93-xqf4- CVSS 3.1
- 6.1 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N - Weakness
- CWE-79
- Updated
- 2026-11-02
Show 6 moreShow less
OSVUBUNTU-CVE-2024-26143
6.1
Rails is a web-application framework. There is a possible XSS vulnerability when using the translation helpers in Action Controller. 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. The vulnerability is fixed in 7.1.3.1 and 7.0.8.1.
- Record
UBUNTU-CVE-2024-26143- CVSS 3.1
- 6.1 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N - Updated
- 2026-11-02
OSVBIT-rails-2024-26143 No score
Rails Possible XSS Vulnerability in Action Controller
Rails is a web-application framework. There is a possible XSS vulnerability when using the translation helpers in Action Controller. 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. The vulnerability is fixed in 7.1.3.1 and 7.0.8.1.
- Record
BIT-rails-2024-26143- Updated
- 2026-11-02
OSVopenSUSE-SU-2024:14067-1 No score
ruby3.3-rubygem-actionpack-7.0-7.0.8.4-1.1 on GA media
These are all security issues fixed in the ruby3.3-rubygem-actionpack-7.0-7.0.8.4-1.1 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2024:14067-1- Updated
- 2026-11-02
OSVopenSUSE-SU-2024:14074-1 No score
ruby3.3-rubygem-rails-7.0-7.0.8.4-1.1 on GA media
These are all security issues fixed in the ruby3.3-rubygem-rails-7.0-7.0.8.4-1.1 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2024:14074-1- Updated
- 2026-11-02
OSVopenSUSE-SU-2025:15110-1 No score
ruby3.4-rubygem-actionpack-7.0-7.0.8.6-1.3 on GA media
These are all security issues fixed in the ruby3.4-rubygem-actionpack-7.0-7.0.8.6-1.3 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2025:15110-1- Updated
- 2026-11-02
OSVopenSUSE-SU-2025:15124-1 No score
ruby3.4-rubygem-rails-7.0-7.0.8.6-1.3 on GA media
These are all security issues fixed in the ruby3.4-rubygem-rails-7.0-7.0.8.6-1.3 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2025:15124-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
actionpackRubyGems |
7.0.0 up to 7.0.8.1 | 7.0.8.1 |
actionpackRubyGems |
7.1.0 up to 7.1.3.1 | 7.1.3.1 |
railsRubyGems |
7.0.0 up to 7.0.8.1 | 7.0.8.1 |
railsRubyGems |
7.1.0 up to 7.1.3.1 | 7.1.3.1 |
railsBitnami |
7.0.0 up to 7.0.9, 7.1.0 up to 7.1.4 | 7.0.97.1.4 |
actionpackRubyGems |
7.0.0 up to 7.0.8.1, plus listed versions 7.0.17.0.27.0.2.17.0.2.27.0.2.3 Show 14 moreShow less7.0.2.47.0.37.0.3.17.0.47.0.4.17.0.4.27.0.4.37.0.57.0.5.17.0.67.0.77.0.7.17.0.7.27.0.8 |
7.0.8.1 |
actionpackRubyGems |
7.1.0 up to 7.1.3.1, plus listed versions 7.1.17.1.27.1.3 |
7.1.3.1 |
railsRubyGems |
7.0.0 up to 7.0.8.1, plus listed versions 7.0.17.0.27.0.2.17.0.2.27.0.2.3 Show 14 moreShow less7.0.2.47.0.37.0.3.17.0.47.0.4.17.0.4.27.0.4.37.0.57.0.5.17.0.67.0.77.0.7.17.0.7.27.0.8 |
7.0.8.1 |
railsRubyGems |
7.1.0 up to 7.1.3.1, plus listed versions 7.1.17.1.27.1.3 |
7.1.3.1 |
railsUbuntu:Pro:16.04:LTS |
All versions, plus listed versions 2:4.1.10-12:4.2.5-12:4.2.5.1-12:4.2.5.2-22:4.2.6-12:4.2.6-1ubuntu0.1~esm12:4.2.6-1ubuntu0.1~esm2 |
None known |
Show 11 moreShow less
| Package | Affected | Fixed |
|---|---|---|
railsUbuntu:Pro:18.04:LTS |
All versions, plus listed versions 2:4.2.9-22:4.2.9-42:4.2.10-0ubuntu42:4.2.10-0ubuntu4+esm12:4.2.10-0ubuntu4+esm2 |
None known |
railsUbuntu:Pro:20.04:LTS |
All versions, plus listed versions 2:5.2.2.1+dfsg-1ubuntu12:5.2.3+dfsg-32:5.2.3+dfsg-3ubuntu0.1~esm1 |
None known |
railsUbuntu:Pro:22.04:LTS |
All versions, plus listed versions 2:6.0.3.7+dfsg-22:6.1.4.1+dfsg-8ubuntu22:6.1.4.1+dfsg-8ubuntu2+esm1 |
None known |
railsUbuntu:24.04:LTS |
All versions, plus listed versions 2:6.1.7.3+dfsg-2build12:6.1.7.3+dfsg-3 |
None known |
railsUbuntu:25.10 |
All versions, plus listed versions 2:6.1.7.3+dfsg-72:7.2.2.1+dfsg-7 |
None known |
railsUbuntu:26.10 |
All versions, plus listed versions 2:7.2.3+dfsg-22:7.2.3.2+dfsg-2 |
None known |
railsUbuntu:26.04:LTS |
All versions, plus listed versions 2:7.2.2.1+dfsg-72:7.2.2.2+dfsg-22:7.2.3+dfsg-2 |
None known |
rubygem-actionpack-7.0openSUSE:Tumbleweed From an advisory covering 6 CVEs |
before 7.0.8.4-1.1 | 7.0.8.4-1.1 |
rubygem-rails-7.0openSUSE:Tumbleweed From an advisory covering 4 CVEs |
before 7.0.8.4-1.1 | 7.0.8.4-1.1 |
rubygem-actionpack-7.0openSUSE:Tumbleweed From an advisory covering 8 CVEs |
before 7.0.8.6-1.3 | 7.0.8.6-1.3 |
rubygem-rails-7.0openSUSE:Tumbleweed From an advisory covering 8 CVEs |
before 7.0.8.6-1.3 | 7.0.8.6-1.3 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | ||
| aliases, published | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2024-26143 is a medium vulnerability (CVSS 6.1) in Rails, published February 27, 2024. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 1.03%, the 64th percentile. Fixed in actionpack 7.0.8.1.
References
github.com/rails/rails/security/advisories/GHSA-9822-6m93-xqf4
github.com/rails/rails/commit/4c83b331092a79d58e4adffe4be5f250fa5782cc
github.com/rails/rails/commit/5187a9ef51980ad1b8e81945ebe0462d28f84f9e
discuss.rubyonrails.org/t/possible-xss-vulnerability-in-action-controller/84947
github.com/rubysec/ruby-advisory-db/blob/master/gems/actionpack/CVE-2024-26143.yml
security.netapp.com/advisory/ntap-20240510-0004
Show 19 moreShow less
nvd.nist.gov/vuln/detail/CVE-2024-26143
github.com/advisories/GHSA-9822-6m93-xqf4
github.com/CVEProject/cvelistV5/tree/main/cves/2024/26xxx/CVE-2024-26143.json
github.com/rails/rails
ubuntu.com/security/CVE-2024-26143
cve.org/CVERecord?id=CVE-2024-26143
suse.com/security/cve/CVE-2022-23633
suse.com/security/cve/CVE-2023-22792
suse.com/security/cve/CVE-2023-22795
suse.com/security/cve/CVE-2023-22797
suse.com/security/cve/CVE-2024-26143
suse.com/security/cve/CVE-2024-28103
suse.com/security/cve/CVE-2023-38037
suse.com/security/cve/CVE-2024-34341
suse.com/security/cve/CVE-2024-41128
suse.com/security/cve/CVE-2024-47887
lists.opensuse.org/archives/list/[email protected]/thread/3C5WPU2RXUSPKAI3EANLIGCY34ZDBZ4Y
suse.com/security/cve/CVE-2024-47888
suse.com/security/cve/CVE-2024-47889