CVE-2024-37031 — Vulnerability in activeadmin — CVE Details
activeadmin vulnerable to stored persistent cross-site scripting (XSS) in dynamic form legends
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.63%). Schedule for your next planned update.
Does your project use an affected activeadmin version?
Paste your Gemfile.lock to check it for CVE-2024-37031 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
Users settings their active admin form legends dynamically may be vulnerable to stored XSS, as long as its value can be injected directly by a malicious user.
For example:
- A public web application allows users to create entities with arbitrary names.
- Active Admin is used to administrate these entities through a private backend.
- The form to edit these entities in the private backend has the following shape (note the dynamic
namevalue dependent on an attribute of theresource):
form do |f|
f.inputs name: resource.name do
f.input :name
f.input :description
end
f.actions
end
Then a malicious user could create an entity with a payload that would get executed in the active admin administrator's browser.
Both form blocks with an implicit or explicit name (i.e., both form resource.name or form name: resource.name would suffer from the problem), where the value of the name can be arbitrarily set by non admin users.
Patches
The problem has been fixed in ActiveAdmin 3.2.2 and ActiveAdmin 4.0.0.beta7.
Workarounds
Users can workaround this problem without upgrading by explicitly escaping the form name using an HTML escaping utility. For example:
form do |f|
f.inputs name: ERB::Util.html_escape(resource.name) do
f.input :name
f.input :description
end
f.actions
end
Upgrading is of course recommended though.
References
https://owasp.org/www-community/attacks/xss/#stored-xss-attacks
Advisory Timeline
- First published June 2, 2024 (907 days ago).
- Last revised July 8, 2026 — 765 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
gem install activeadmin -v 3.2.2
gem install activeadmin -v 4.0.0.beta7
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (2)
Affects 1 ecosystem: RubyGems (1).
| Package | Fixed In |
|---|---|
| activeadmin RubyGems · Affected: 0.1.0, 0.1.1, 0.2.0, 0.2.1 (+65 more) | 3.2.2 |
| activeadmin RubyGems · Affected: 4.0.0.beta1, 4.0.0.beta2, 4.0.0.beta3, 4.0.0.beta4 (+2 more) | 4.0.0.beta7 |
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) 7.2 score means for each attack dimension.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N
References
- https://github.com/activeadmin/activeadmin/security/advisories/GHSA-9mg6-x45v-hcfmWEB
- https://nvd.nist.gov/vuln/detail/CVE-2024-37031ADVISORY
- https://github.com/activeadmin/activeadmin/pull/8349WEB
- https://github.com/activeadmin/activeadminPACKAGE
- https://github.com/activeadmin/activeadmin/releases/tag/v3.2.2WEB
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/activeadmin/CVE-2024-37031.ymlWEB
- https://rubygems.org/gems/activeadmin/versions/3.2.2WEB
Frequently Asked Questions
- What is CVE-2024-37031?
- activeadmin vulnerable to stored persistent cross-site scripting (XSS) in dynamic form legends. This vulnerability has been assigned a severity rating of HIGH (CVSS score: 7.2/10).
- How do I check if my project is affected by CVE-2024-37031?
- CVE-2024-37031 affects activeadmin. It has a 0.6% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2024-37031 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Significant impact if exploited, or exploitable with modest effort.
This is a below-median EPSS score — only 44.5% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.
Also Known As
Related CVEs
- CVE-2023-50448HIGH
Potential CSV export data leak
- CVE-2026-126366HIGH
msgpack-ruby JRuby decoder makes uncapped header-count allocations; a 5-byte message forces multi-GiB OOM
- CVE-2026-126081HIGH
Action Pack: Possible Strong Parameters Bypass in Parameters#each_key
- CVE-2023-51763MEDIUM
ActiveAdmin CSV Injection leading to sensitive information disclosure