Am I affected?

type your ash_admin version to check

Description

Improper Limitation of a Pathname to a Restricted Directory (Path Traversal) vulnerability in ash-project ash_admin allows writing attacker-controlled bytes to arbitrary paths on the server.

AshAdmin.Components.Resource.Form.consume_file_uploads/1 builds the destination as Path.join([tmp_dir, entry.client_name]) and writes it with File.cp!/2. entry.client_name is the browser-supplied filename and is not sanitized, and Path.join/1 does not normalize ... An upload named ../../../../var/www/app/priv/static/x.png therefore escapes the random temp directory and lands anywhere the BEAM user can write, enabling arbitrary file write and potentially remote code execution by overwriting application assets, configuration, or cron/ssh files. The only guard is an extension allowlist defaulting to :any that checks only the extension. The fix strips path components with Path.basename/1 before joining.

This issue affects ash_admin: from 0.13.7 before 1.3.1.

Weaknesses & attack patterns

Weakness

CWE-22 · Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in catalog → MITRE ↗

Attack patterns

CAPEC-126 · Path Traversal MITRE ↗

Affected — Hex / ash_admin Hex.pm ↗ Repository ↗

0.13.7 < 1.3.1 affected
every other version: unaffected
cpe cpe:2.3:a:ash-project:ash_admin:*:*:*:*:*:*:*:*
modules · source files · routines
modules 'Elixir.AshAdmin.Components.Resource.Form'
source files lib/ash_admin/components/resource/form.ex
routines 'Elixir.AshAdmin.Components.Resource.Form':consume_file_uploads/1

Affected — GitHub / ash-project/ash_admin Repository ↗

e8f496b < 4bb41cb affected
every other version: unaffected
cpe cpe:2.3:a:ash-project:ash_admin:*:*:*:*:*:*:*:*
modules · source files · routines
modules 'Elixir.AshAdmin.Components.Resource.Form'
source files lib/ash_admin/components/resource/form.ex
routines 'Elixir.AshAdmin.Components.Resource.Form':consume_file_uploads/1

References

Credits

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

CVSS breakdown

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