Cross-Site Scripting (XSS) in activeadmin (CVE-2024-37031)
Summary
Cross-site scripting in activeadmin (CVE-2024-37031). Risk of unauthorized operations or information disclosure. Exploitable via name. Mitigation: upgrade to 4.0.0.beta7 or later.
Original description
The description as published by the source.
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
Source: OSV.dev (Open Source Vulnerabilities) NVD GitHub Advisory OSV
Auto-generated summary
Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.
A vulnerability tracked as CVE-2024-37031 has been found in activeadmin.
Attackers can target a specific entry point like name over the network to misuse the product.
Risk of unauthorized operations or information disclosure.
What to do: upgrade activeadmin to 4.0.0.beta7 or later.
If unsure, ask your IT team or search "activeadmin CVE-2024-37031" on the vendor's site.
CVE-2024-37031 (activeadmin) — CWE-79
Attack vector: remote (network-reachable) / unauthenticated / no user interaction
Attack surface: name / resource / form
Patched: 4.0.0.beta7 — apply immediately
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.
Cross-site scripting (XSS) (CWE-79) exists in activeadmin. Attackers reach the vulnerable code path via name without authentication.
Check the vendor advisory for the affected versions of activeadmin. Attack surface: name / resource / form.
Severity: ?. Risk of unauthorized operations or information disclosure.
Update to 4.0.0.beta7.
Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.
Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'activeadmin' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.
Response actions
Concrete steps and command examples for SOC/SRE teams to execute in order
-
1Identify exposure identify
grep -r 'activeadmin' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
activeadminを grep し、稼働しているサービス・バージョンを把握する。 -
2Apply patch patch
Upgrade activeadmin to 4.0.0.beta7ステージング環境で 4.0.0.beta7 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
3Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Affected packages
References
- advisory nvd.nist.gov
- package github.com
- web github.com
- web github.com
- web github.com
- web github.com
- web rubygems.org