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

exploitDog

github логотип

GHSA-8qgm-g2vv-vwvc

Опубликовано: 08 июл. 2024
Источник: github
Github: Прошло ревью
CVSS4: 6.1
CVSS3: 6.8

Описание

RailsAdmin Cross-site Scripting vulnerability in the list view

Impact

RailsAdmin list view has the XSS vulnerability, caused by improperly-escaped HTML title attribute. The issue was originally reported in https://github.com/railsadminteam/rails_admin/issues/3686.

Patches

Upgrade to 3.1.4. The vulnerability itself was patched in 3.1.3 but it has a functionality issue. Initially the vulnerability was thought to exist in versions before 3.0, but it didn't. 2.x users can stay on 2.2.1.

Workarounds

  1. Copy the index view (located under the path app/views/rails_admin/main/index.html.erb) from the RailsAdmin version you use, and place it into your application by using the same path.
  2. Open the view file by an editor, and change the way to populate the td tag:
<% properties.map{ |property| property.bind(:object, object) }.each do |property| %> <% value = property.pretty_value %> - <td class="<%= [property.sticky? && 'sticky', property.css_class, property.type_css_class].select(&:present?).join(' ') %>" title="<%= value %>"> + <%= content_tag(:td, class: [property.sticky? && 'sticky', property.css_class, property.type_css_class].select(&:present?), title: strip_tags(value.to_s)) do %> <%= value %> - </td> + <% end %> <% end %>

Note: The view file created by this needs to be removed after upgrading RailsAdmin afterwards, unless this old view continue to be used. Only do this if you can't upgrade RailsAdmin now for a reason.

References

https://owasp.org/www-community/attacks/xss/ https://api.rubyonrails.org/classes/ActionView/Helpers/SanitizeHelper.html#method-i-strip_tags

Пакеты

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

rails_admin

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

>= 3.0.0.beta, < 3.1.3

3.1.3

EPSS

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

6.1 Medium

CVSS4

6.8 Medium

CVSS3

Дефекты

CWE-79

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

CVSS3: 5.4
ubuntu
больше 1 года назад

RailsAdmin is a Rails engine that provides an interface for managing data. RailsAdmin list view has the XSS vulnerability, caused by improperly-escaped HTML title attribute. Upgrade to 3.1.3 or 2.2.2 (to be released).

CVSS3: 5.4
nvd
больше 1 года назад

RailsAdmin is a Rails engine that provides an interface for managing data. RailsAdmin list view has the XSS vulnerability, caused by improperly-escaped HTML title attribute. Upgrade to 3.1.3 or 2.2.2 (to be released).

EPSS

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

6.1 Medium

CVSS4

6.8 Medium

CVSS3

Дефекты

CWE-79