Skip to content

Commit 9543dd9

Browse files
postmodernRubySec CI
authored andcommitted
Updated advisory posts against rubysec/ruby-advisory-db@d3c8772
1 parent 6ca514c commit 9543dd9

File tree

1 file changed

+43
-18
lines changed

1 file changed

+43
-18
lines changed

advisories/_posts/2024-02-21-CVE-2024-26143.md

Lines changed: 43 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,49 @@ advisory:
1212
url: https://discuss.rubyonrails.org/t/possible-xss-vulnerability-in-action-controller/84947
1313
title: Possible XSS Vulnerability in Action Controller
1414
date: 2024-02-21
15-
description: "There is a possible XSS vulnerability when using the translation helpers\n(`translate`,
16-
`t`, etc) in Action Controller. This vulnerability has been\nassigned the CVE
17-
identifier CVE-2024-26143.\n\nVersions Affected: All. Not affected: None Fixed
18-
Versions: 7.1.3.1, 7.0.8.1\n\n# Impact\n\nApplications using translation methods
19-
like `translate`, or `t` on a\ncontroller, with a key ending in “_html”, a `:default`
20-
key which contains\nuntrusted user input, and the resulting string is used in
21-
a view, may be\nsusceptible to an XSS vulnerability.\n\nFor example, impacted
22-
code will look something like this:\n\n```\nclass ArticlesController < ApplicationController\n
23-
\ def show \n @message = t(\"message_html\", default: untrusted_input)\n #
24-
The `show` template displays the contents of `@message`\n end\nend\n```\n\nTo
25-
reiterate the pre-conditions, applications must:\n\n* Use a translation function
26-
from a controller (i.e. *not* `I18n.t`, or\n`t` from a view)\n* Use a key that
27-
ends in `_html`\n* Use a default value where the default value is untrusted and
28-
unescaped input\n* Send the text to the victim (whether that’s part of a template,
29-
or a\n `render` call)\n\nAll users running an affected release should either
30-
upgrade or use one of the workarounds immediately.\n\n# Releases\n\nThe fixed
31-
releases are available at the normal locations.\n\n# Workarounds\n\nThere are
32-
no feasible workarounds for this issue.\n"
15+
description: |
16+
There is a possible XSS vulnerability when using the translation helpers
17+
(`translate`, `t`, etc) in Action Controller. This vulnerability has been
18+
assigned the CVE identifier CVE-2024-26143.
19+
20+
Versions Affected: All. Not affected: None Fixed Versions: 7.1.3.1, 7.0.8.1
21+
22+
# Impact
23+
24+
Applications using translation methods like `translate`, or `t` on a
25+
controller, with a key ending in “_html”, a `:default` key which contains
26+
untrusted user input, and the resulting string is used in a view, may be
27+
susceptible to an XSS vulnerability.
28+
29+
For example, impacted code will look something like this:
30+
31+
```
32+
class ArticlesController < ApplicationController
33+
def show
34+
@message = t("message_html", default: untrusted_input)
35+
# The `show` template displays the contents of `@message`
36+
end
37+
end
38+
```
39+
40+
To reiterate the pre-conditions, applications must:
41+
42+
* Use a translation function from a controller (i.e. *not* `I18n.t`, or
43+
`t` from a view)
44+
* Use a key that ends in `_html`
45+
* Use a default value where the default value is untrusted and unescaped input
46+
* Send the text to the victim (whether that’s part of a template, or a
47+
`render` call)
48+
49+
All users running an affected release should either upgrade or use one of the workarounds immediately.
50+
51+
# Releases
52+
53+
The fixed releases are available at the normal locations.
54+
55+
# Workarounds
56+
57+
There are no feasible workarounds for this issue.
3358
patched_versions:
3459
- "~> 7.0.8, >= 7.0.8.1"
3560
- ">= 7.1.3.1"

0 commit comments

Comments
 (0)