🛡️ CVE-2024-39308 — rails-admin

🟡 CVSS 5.4 — Medium ✅ No Known Exploit CWE-79 OSV
5.4
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

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](https://rubygems.org/gems/rails_admin/versions/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:

```diff

<% 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

How this vulnerability can be exploited

This issue can be reached over the network, attack complexity is low, an attacker needs low-level privileges on the target. A user must be tricked into taking some action. Rated impact: confidentiality none, integrity none, availability none.

Weakness class

CVE-2024-39308 is classified as CWE-79: Cross-site Scripting (XSS). User-supplied data is written into a page without escaping, so attacker script runs in the browser of anyone who views it.

Affected software

CVE-2024-39308 is recorded against 1 package.

  • rails-admin (from 3.0.0.beta up to 3.1.3)

Timeline and source

Published on 8 July 2024 and last revised on 17 June 2026. No public exploit is currently recorded for this entry. A vendor advisory or fix has been published. Record sourced from OSV.

References

github.com (Web)
nvd.nist.gov (Advisory)
github.com (Web)
github.com (Web)
github.com (Web)
github.com (Package)
github.com (Web)
rubygems.org (Web)
rubygems.org (Web)

CVE-2024-39308 on other distributions

Each distribution ships its own build and its own fixed version. Pick the one you run:

Details

Severity MEDIUM
CVSS Score 5.4
CVSS Vector CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:H/SI:N/SA:N
CWE CWE-79
Public Exploit ✅ No
Source OSV
Published 2024-07-08
Updated 2026-08-12
Modified 2026-06-17

Affected Packages

Software From version Fixed in
rails-admin 3.0.0.beta 3.1.3

Vulnerability Monitoring

Track new vulnerabilities in rails-admin

CVE-2024-39308 is rated CVSS 5.4 Medium. BotEraser monitors your WordPress installation and notifies you when software you use appears in our vulnerability database.

Set Up Free Alerts →

No credit card required  ·  Results in minutes

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.