Every CVE Search/ Get API key

CVE-2024-37031

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

6.1 MediumFix available

The Active Admin (aka activeadmin) framework before 3.2.2 for Ruby on Rails allows stored XSS in certain situations where users can create entities (to be later edited in forms) with arbitrary names, aka a "dynamic form legends" issue. 4.0.0.beta7 is also a fixed version.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
Required

What an attacker can affect

Confidentiality
Low
Integrity
Low
Availability
None

Exploit likelihood

0.35%Up 0.3 points since Feb 14, 2025
90%50%10%1%

What each source reports

CVE List Score used 6.1

The Active Admin (aka activeadmin) framework before 3.2.2 for Ruby on Rails allows stored XSS in certain situations where users can create entities (to be later edited in forms) with arbitrary names, aka a "dynamic form legends" issue. 4.0.0.beta7 is also a fixed version.

Record
CVE-2024-37031
CVSS 3.1
6.1 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Weakness
CWE-79
Updated
2026-11-02
EUVDEUVD-2024-2006 6.1

The Active Admin (aka activeadmin) framework before 3.2.2 for Ruby on Rails allows stored XSS in certain situations where users can create entities (to be later edited in forms) with arbitrary names, aka a "dynamic form legends" issue. 4.0.0.beta7 is also a fixed version.

Record
EUVD-2024-2006
CVSS 3.1
6.1 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Updated
2026-11-03
GitHub AdvisoriesGHSA-9mg6-x45v-hcfm 7.2

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

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

Record
GHSA-9mg6-x45v-hcfm
CVSS 3.1
7.2 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N
Weakness
CWE-79
Updated
2026-11-02
NVD 6.1

The Active Admin (aka activeadmin) framework before 3.2.2 for Ruby on Rails allows stored XSS in certain situations where users can create entities (to be later edited in forms) with arbitrary names, aka a "dynamic form legends" issue. 4.0.0.beta7 is also a fixed version.

Record
CVE-2024-37031
CVSS 3.1
6.1 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Weakness
CWE-79
Updated
2026-11-02
OSV 6.1

The Active Admin (aka activeadmin) framework before 3.2.2 for Ruby on Rails allows stored XSS in certain situations where users can create entities (to be later edited in forms) with arbitrary names, aka a "dynamic form legends" issue. 4.0.0.beta7 is also a fixed version.

Record
CVE-2024-37031
CVSS 3.1
6.1 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Updated
2026-11-02
OSVGHSA-9mg6-x45v-hcfm 7.2

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

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

Record
GHSA-9mg6-x45v-hcfm
CVSS 3.1
7.2 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N
Weakness
CWE-79
Updated
2026-11-02

Affected packages

Affected packages
PackageAffectedFixed
activeadmin
RubyGems
before 3.2.2
3.2.2
activeadmin
RubyGems
4.0.0.beta1 up to 4.0.0.beta7
4.0.0.beta7
activeadmin
RubyGems
before 3.2.2, plus listed versions
0.1.00.1.10.2.00.2.10.2.2
Show 45 moreShow less
0.3.00.3.10.3.20.3.30.3.40.4.00.4.10.4.20.4.30.4.40.5.00.5.0.pre0.5.0.pre10.5.10.6.00.6.10.6.20.6.30.6.40.6.50.6.61.0.01.0.0.pre11.0.0.pre21.0.0.pre31.0.0.pre41.0.0.pre51.1.01.2.01.2.11.3.01.3.11.4.01.4.11.4.21.4.32.0.02.0.0.rc12.0.0.rc22.1.02.10.02.10.12.11.02.11.12.11.2
3.2.2
activeadmin
RubyGems
4.0.0.beta1 up to 4.0.0.beta7, plus listed versions
4.0.0.beta24.0.0.beta34.0.0.beta44.0.0.beta54.0.0.beta6
4.0.0.beta7

History

History
RecordedChangedSources
aliasesEUVD
first indexedCVE List, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2024-37031 is a medium vulnerability (CVSS 6.1) in activeadmin, published June 2, 2024. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.35%, the 29th percentile. Fixed in activeadmin 3.2.2.

References

This page doesn't list everything

Left out here: 19 versions. The JSON record has them.

MoveEnter Open