Логотип exploitDog
Консоль
Логотип exploitDog

exploitDog

github логотип

GHSA-65cv-r6x7-79hv

Опубликовано: 19 мар. 2020
Источник: github
Github: Прошло ревью
CVSS3: 4.8

Описание

Cross site scripting vulnerability in ActionView

There is a possible cross site scripting (XSS) vulnerability in ActionView's JavaScript literal escape helpers. Views that use the j or escape_javascript methods may be susceptible to XSS attacks.

Impact

There is a possible XSS vulnerability in the j and escape_javascript methods in ActionView. These methods are used for escaping JavaScript string literals. Impacted code will look something like this:

<script>let a = `<%= j unknown_input %>`</script>

or

<script>let a = `<%= escape_javascript unknown_input %>`</script>

Releases

The 6.0.2.2 and 5.2.4.2 releases are available at the normal locations.

Workarounds

For those that can't upgrade, the following monkey patch may be used:

ActionView::Helpers::JavaScriptHelper::JS_ESCAPE_MAP.merge!( { "`" => "\\`", "$" => "\\$" } ) module ActionView::Helpers::JavaScriptHelper alias :old_ej :escape_javascript alias :old_j :j def escape_javascript(javascript) javascript = javascript.to_s if javascript.empty? result = "" else result = javascript.gsub(/(\\|<\/|\r\n|\342\200\250|\342\200\251|[\n\r"']|[`]|[$])/u, JS_ESCAPE_MAP) end javascript.html_safe? ? result.html_safe : result end alias :j :escape_javascript end

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.

Please note that only the 5.2 and 6.0 series are supported at present. Users of earlier unsupported releases are advised to upgrade as soon as possible as we cannot guarantee the continued availability of security fixes for unsupported releases.

Credits

Thanks to Jesse Campos from Chef Secure

Пакеты

Наименование

actionview

rubygems
Затронутые версииВерсия исправления

<= 5.2.4.1

5.2.4.2

Наименование

actionview

rubygems
Затронутые версииВерсия исправления

>= 6.0.0, <= 6.0.2.1

6.0.2.2

EPSS

Процентиль: 75%
0.00887
Низкий

4.8 Medium

CVSS3

Дефекты

CWE-80

Связанные уязвимости

CVSS3: 4
ubuntu
почти 6 лет назад

In ActionView before versions 6.0.2.2 and 5.2.4.2, there is a possible XSS vulnerability in ActionView's JavaScript literal escape helpers. Views that use the `j` or `escape_javascript` methods may be susceptible to XSS attacks. The issue is fixed in versions 6.0.2.2 and 5.2.4.2.

CVSS3: 4.8
redhat
почти 6 лет назад

In ActionView before versions 6.0.2.2 and 5.2.4.2, there is a possible XSS vulnerability in ActionView's JavaScript literal escape helpers. Views that use the `j` or `escape_javascript` methods may be susceptible to XSS attacks. The issue is fixed in versions 6.0.2.2 and 5.2.4.2.

CVSS3: 4
nvd
почти 6 лет назад

In ActionView before versions 6.0.2.2 and 5.2.4.2, there is a possible XSS vulnerability in ActionView's JavaScript literal escape helpers. Views that use the `j` or `escape_javascript` methods may be susceptible to XSS attacks. The issue is fixed in versions 6.0.2.2 and 5.2.4.2.

CVSS3: 4
debian
почти 6 лет назад

In ActionView before versions 6.0.2.2 and 5.2.4.2, there is a possible ...

suse-cvrf
больше 5 лет назад

Security update for rubygem-actionview-5_1

EPSS

Процентиль: 75%
0.00887
Низкий

4.8 Medium

CVSS3

Дефекты

CWE-80