CVE-2024-39308 — Vulnerability in rails_admin — CVE Details
RailsAdmin Cross-site Scripting vulnerability in the list view
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.99%). Schedule for your next planned update.
Does your project use an affected rails_admin version?
Paste your Gemfile.lock to check it for CVE-2024-39308 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
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
- 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. - 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
Advisory Timeline
- First published July 8, 2024 (871 days ago).
- Last revised September 10, 2026 — 794 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
gem install rails_admin -v 3.1.3
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (1)
Affects 1 ecosystem: RubyGems (1).
| Package | Fixed In |
|---|---|
| rails_admin RubyGems · Affected: 3.0.0, 3.0.0.beta, 3.0.0.beta2, 3.0.0.rc (+9 more) | 3.1.3 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-79Cross-site Scripting (XSS)MITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 6.8 score means for each attack dimension.
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:N/A:N
References
- https://github.com/railsadminteam/rails_admin/security/advisories/GHSA-8qgm-g2vv-vwvcWEB
- https://nvd.nist.gov/vuln/detail/CVE-2024-39308ADVISORY
- https://github.com/railsadminteam/rails_admin/issues/3686WEB
- https://github.com/railsadminteam/rails_admin/commit/b5a287d82e2cbd1737a1a01e11ede2911cce7fefWEB
- https://github.com/railsadminteam/rails_admin/commit/d84b39884059c4ed50197cec8522cca029a17673WEB
- https://github.com/railsadminteam/rails_adminPACKAGE
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rails_admin/CVE-2024-39308.ymlWEB
- https://rubygems.org/gems/rails_admin/versions/2.3.0WEB
- https://rubygems.org/gems/rails_admin/versions/3.1.3WEB
Frequently Asked Questions
- What is CVE-2024-39308?
- RailsAdmin Cross-site Scripting vulnerability in the list view. This vulnerability has been assigned a severity rating of MEDIUM (CVSS score: 6.8/10).
- How do I check if my project is affected by CVE-2024-39308?
- CVE-2024-39308 affects rails_admin. It has a 1.0% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2024-39308 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Exploitation requires specific conditions, or the impact is limited.
This is an above-median EPSS score — 61.3% of tracked vulnerabilities score at or below it, putting its exploitation likelihood in the upper half of the tracked corpus.
Also Known As
Related CVEs
- CVE-2016-10522HIGH
Cross-site request forgery in rails_admin
- CVE-2026-128084MEDIUM
sqlite3-ruby: Possible SQL query truncation when a string is 4 GiB or larger
- CVE-2026-115472MEDIUM
Doorkeeper: When using public clients, any client can revoke any access token