Loading...
Skip to main content

CVE-2024-37031 — Vulnerability in activeadmin — CVE Details

HIGH

activeadmin vulnerable to stored persistent cross-site scripting (XSS) in dynamic form legends

Published June 2, 2024Updated July 8, 2026Source: osv

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 `name` value dependent on an attribute of the `resource`): ```ruby 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: ```ruby 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 (862 days ago).
  • Last revised July 8, 2026 — 765 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Bundler
Update activeadmin to 3.2.2 or later
gem install activeadmin -v 3.2.2
Bundler
Update activeadmin to 4.0.0.beta7 or later
gem install activeadmin -v 4.0.0.beta7

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (2)

Affects 1 ecosystem: rubygems (1).

PackageEcosystemAffectedFixed In
activeadmin
rubygems
0.1.0, 0.1.1, 0.2.0, 0.2.1 (+65 more)3.2.2
activeadmin
rubygems
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-79
    Cross-site Scripting (XSS)MITRE

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 7.2 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
None

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N

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. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2024-37031 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
7.2

High exploitability or significant impact. Prioritize remediation within days.

Also Known As

GHSA-9mg6-x45v-hcfm

Related CVEs

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies