{"id":"CVE-2024-37031","aliases":["EUVD-2024-2006","GHSA-9mg6-x45v-hcfm"],"status":"published","title":"activeadmin vulnerable to stored persistent cross-site scripting (XSS) in dynamic form legends","description":"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.","severity":{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","level":"medium","assessor":"adp","from":"cve"},"epss":{"day":"2026-11-09","score":0.00352,"percentile":0.29072,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-79"],"published":"2024-06-02T22:32:24Z","modified":"2026-10-28T02:30:20Z","fixes":[{"ecosystem":"RubyGems","package":"activeadmin","fixed_in":["3.2.2","4.0.0.beta7"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"RubyGems","package":"activeadmin","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"3.2.2"}]}]},{"source":"ghsa","ecosystem":"RubyGems","package":"activeadmin","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.0.0.beta1"},{"fixed":"4.0.0.beta7"}]}]},{"source":"osv","ecosystem":"RubyGems","package":"activeadmin","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"3.2.2"}]}],"versions":["0.1.0","0.1.1","0.2.0","0.2.1","0.2.2","0.3.0","0.3.1","0.3.2","0.3.3","0.3.4","0.4.0","0.4.1","0.4.2","0.4.3","0.4.4","0.5.0","0.5.0.pre","0.5.0.pre1","0.5.1","0.6.0","0.6.1","0.6.2","0.6.3","0.6.4","0.6.5","0.6.6","1.0.0","1.0.0.pre1","1.0.0.pre2","1.0.0.pre3","1.0.0.pre4","1.0.0.pre5","1.1.0","1.2.0","1.2.1","1.3.0","1.3.1","1.4.0","1.4.1","1.4.2","1.4.3","2.0.0","2.0.0.rc1","2.0.0.rc2","2.1.0","2.10.0","2.10.1","2.11.0","2.11.1","2.11.2","2.12.0","2.13.0","2.13.1","2.14.0","2.2.0","2.3.0","2.3.1","2.4.0","2.5.0","2.6.0","2.6.1","2.7.0","2.8.0","2.8.1","2.9.0","3.0.0","3.1.0","3.2.0","3.2.1"]},{"source":"osv","ecosystem":"RubyGems","package":"activeadmin","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.0.0.beta1"},{"fixed":"4.0.0.beta7"}]}],"versions":["4.0.0.beta1","4.0.0.beta2","4.0.0.beta3","4.0.0.beta4","4.0.0.beta5","4.0.0.beta6"]}],"references":[{"url":"https://rubygems.org/gems/activeadmin/versions/3.2.2","tags":["x_transferred","web"]},{"url":"https://github.com/activeadmin/activeadmin/releases/tag/v3.2.2","tags":["x_transferred","web"]},{"url":"https://github.com/activeadmin/activeadmin/security/advisories/GHSA-9mg6-x45v-hcfm","tags":["x_transferred","advisory","web"]},{"url":"https://github.com/activeadmin/activeadmin/pull/8349","tags":["web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-37031","tags":["advisory"]},{"url":"https://github.com/rubysec/ruby-advisory-db/blob/master/gems/activeadmin/CVE-2024-37031.yml","tags":["web"]},{"url":"https://github.com/advisories/GHSA-9mg6-x45v-hcfm"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/37xxx/CVE-2024-37031.json","tags":["advisory"]},{"url":"https://github.com/activeadmin/activeadmin","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2024-37031","description":"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.","status":"published","published":"2024-06-03T05:54:46.881Z","modified":"2025-02-13T15:59:48.084Z","cvss":[{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","level":"medium","assessor":"adp"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T14:34:00.585327Z"}],"euvd":[{"id":"EUVD-2024-2006","description":"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.","status":"published","published":"2024-06-03T05:54:46Z","modified":"2025-02-13T15:59:48Z","cvss":[{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","level":"medium"}],"updated_at":"2026-11-03T00:03:53.726571Z"}],"ghsa":[{"id":"GHSA-9mg6-x45v-hcfm","title":"activeadmin vulnerable to stored persistent cross-site scripting (XSS) in dynamic form legends","description":"### Impact\n\nUsers 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.\n\nFor example:\n\n* A public web application allows users to create entities with arbitrary names.\n* Active Admin is used to administrate these entities through a private backend.\n* 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`):\n\n```ruby\n  form do |f|\n    f.inputs name: resource.name do\n      f.input :name\n      f.input :description\n    end\n\n    f.actions\n  end\n```\n\nThen a malicious user could create an entity with a payload that would get executed in the active admin administrator's browser.\n\nBoth `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.\n\n### Patches\n\nThe problem has been fixed in ActiveAdmin 3.2.2 and ActiveAdmin 4.0.0.beta7.\n\n### Workarounds\n\nUsers can workaround this problem without upgrading by explicitly escaping the form name using an HTML escaping utility. For example:\n\n```ruby\n  form do |f|\n    f.inputs name: ERB::Util.html_escape(resource.name) do\n      f.input :name\n      f.input :description\n    end\n\n    f.actions\n  end\n```\nUpgrading is of course recommended though.\n\n### References\nhttps://owasp.org/www-community/attacks/xss/#stored-xss-attacks","status":"published","published":"2024-06-02T22:32:24Z","modified":"2024-10-28T12:37:01Z","cvss":[{"version":"3.1","score":7.2,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N","level":"high"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T14:38:13.90937Z"}],"nvd":[{"id":"CVE-2024-37031","description":"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.","status":"published","published":"2024-06-03T06:15:10.143Z","modified":"2026-06-17T07:37:38.273Z","cvss":[{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","level":"medium","assessor":"secondary"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T14:10:03.465199Z"}],"osv":[{"id":"CVE-2024-37031","description":"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.","status":"published","published":"2024-06-03T05:54:46.881Z","modified":"2026-10-28T02:30:20.643918853Z","cvss":[{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","level":"medium"}],"updated_at":"2026-11-02T15:44:41.133403Z"},{"id":"GHSA-9mg6-x45v-hcfm","title":"activeadmin vulnerable to stored persistent cross-site scripting (XSS) in dynamic form legends","description":"### Impact\n\nUsers 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.\n\nFor example:\n\n* A public web application allows users to create entities with arbitrary names.\n* Active Admin is used to administrate these entities through a private backend.\n* 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`):\n\n```ruby\n  form do |f|\n    f.inputs name: resource.name do\n      f.input :name\n      f.input :description\n    end\n\n    f.actions\n  end\n```\n\nThen a malicious user could create an entity with a payload that would get executed in the active admin administrator's browser.\n\nBoth `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.\n\n### Patches\n\nThe problem has been fixed in ActiveAdmin 3.2.2 and ActiveAdmin 4.0.0.beta7.\n\n### Workarounds\n\nUsers can workaround this problem without upgrading by explicitly escaping the form name using an HTML escaping utility. For example:\n\n```ruby\n  form do |f|\n    f.inputs name: ERB::Util.html_escape(resource.name) do\n      f.input :name\n      f.input :description\n    end\n\n    f.actions\n  end\n```\nUpgrading is of course recommended though.\n\n### References\nhttps://owasp.org/www-community/attacks/xss/#stored-xss-attacks","status":"published","published":"2024-06-02T22:32:24Z","modified":"2026-07-08T06:53:12.51389795Z","cvss":[{"version":"3.1","score":7.2,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N","level":"high"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T15:46:43.875515Z"}]}}
