Executive brief
ash_admin is an administrative interface framework used to manage application data. A stored cross-site scripting vulnerability in the relationship field components allows attackers with database write access to inject malicious scripts into record labels, which are then executed in administrators' browsers when they search for those records. This gives attackers full administrative privileges over all data managed through the interface.
Technical details
The vulnerability exists in the AshAdmin.Components.Resource.RelationshipField and AshAdmin.Components.Resource.ManagedRelationshipSelectField components, which highlight search term matches by wrapping them in HTML <b> tags and rendering the entire string using Phoenix.HTML.raw/1, which bypasses output escaping. The vulnerable field displays the destination record's label_field—typically user-editable database content—allowing an attacker to inject payloads such as <img src=x onerror=...> that execute in the admin's session. The attack requires database write access to populate a malicious label, but execution occurs automatically when a matching record appears in the dropdown. The fix applies HTML escaping to the label before inserting highlight markup.
Affected products
- ash-project ash_admin 0.13.0 before 1.3.1
Timeline
- 2026-08-31: disclosed