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

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.

Check my Gemfile.lock

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):
  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.

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, scan your dependencies again to confirm the vulnerability is resolved.

Affected Packages (2)

Affects 1 ecosystem: RubyGems (1).

PackageFixed 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-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. 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

CVSS Score
7.2

Significant impact if exploited, or exploitable with modest effort.

EPSS Score (30-day exploit probability)
0.63%
EPSS percentile: 44.5

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

GHSA-9mg6-x45v-hcfm

Related CVEs

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my Gemfile.lock