Am I affected?

type your ash_admin version to check

Description

Stored Cross-site Scripting vulnerability in ash-project ash_admin executes attacker-supplied record content as script in an administrator's browser.

The relationship typeahead components AshAdmin.Components.Resource.RelationshipField and AshAdmin.Components.Resource.ManagedRelationshipSelectField highlight the matched search term by wrapping it in <b> tags and rendering the whole string with Phoenix.HTML.raw/1. The highlighted value is the destination record's label_field, ordinary database content that is often written by lower-privileged users. Because raw/1 disables output escaping for the entire string, a stored label such as <img src=x onerror=...> runs as JavaScript in the admin's session as soon as a matching record appears in the dropdown, giving the attacker the admin's privileges over everything AshAdmin exposes. The fix HTML-escapes the label before inserting the highlight markup.

This issue affects ash_admin: from 0.13.0 before 1.3.1.

Weaknesses & attack patterns

Weakness

CWE-79 · Improper Neutralization of Input During Web Page Generation in catalog → MITRE ↗

Attack patterns

CAPEC-592 · Stored XSS MITRE ↗

Affected — Hex / ash_admin Hex.pm ↗ Repository ↗

≥ 0.13.0 < 1.3.1 affected
every other version: unaffected
cpe cpe:2.3:a:ash-project:ash_admin:*:*:*:*:*:*:*:*
version type semver
modules · source files
modules 'Elixir.AshAdmin.Components.Resource.RelationshipField' · 'Elixir.AshAdmin.Components.Resource.ManagedRelationshipSelectField'
source files lib/ash_admin/components/resource/relationship_field.ex · lib/ash_admin/components/resource/managed_relationship_select_field.ex

Affected — GitHub / ash-project/ash_admin Repository ↗

≥ eb940f4 < 0728919 affected
every other version: unaffected
cpe cpe:2.3:a:ash-project:ash_admin:*:*:*:*:*:*:*:*
version type git
modules · source files
modules 'Elixir.AshAdmin.Components.Resource.RelationshipField' · 'Elixir.AshAdmin.Components.Resource.ManagedRelationshipSelectField'
source files lib/ash_admin/components/resource/relationship_field.ex · lib/ash_admin/components/resource/managed_relationship_select_field.ex

References

Credits

Peter Ullrich Finder Reporter
Jonatan Männchen / EEF Coordinator
Zach Daniel / Ash Project Remediation developer

CVSS breakdown

CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:A/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N

Exploitability

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
Low
User Interaction
Active

Vulnerable System

Confidentiality
High
Integrity
High
Availability
None

Subsequent Systems

Confidentiality
None
Integrity
None
Availability
None
« All CVEs