Am I affected?

type your ash_lua version to check

Description

Improper Protection of Alternate Path vulnerability in ash-project ash_lua allows a user-supplied Lua script to read attributes that are not on the exposed-field allow-list.

AshLua exposes Ash resources to Lua scripts, gated by a manifest declaring which fields are exposed. The read action's operation aggregate path in AshLua.Runtime took the field name straight from the Lua call and resolved it with only String.to_existing_atom and Ash.Query.Aggregate.new!, neither of which consults the exposed-field allow-list the normal fields path enforces. A script can therefore read the value of any attribute of any record the actor may read, including private sensitive?: true columns, via resource.read({ operation = {"list", "hashed_password"} }); min and max give a value oracle. Anyone able to submit or influence a Lua script can reach this.

This issue affects ash_lua: from 0.1.0 before 0.2.1.

Weaknesses & attack patterns

Weakness

CWE-424 · Improper Protection of Alternate Path in catalog → MITRE ↗

Attack patterns

CAPEC-554 · Functionality Bypass MITRE ↗

Affected — Hex / ash_lua Hex.pm ↗ Repository ↗

0.1.0 < 0.2.1 affected
every other version: unaffected
cpe cpe:2.3:a:ash-project:ash_lua:*:*:*:*:*:*:*:*
modules · source files · routines
modules 'Elixir.AshLua.Runtime'
source files lib/ash_lua/runtime.ex
routines 'Elixir.AshLua.Runtime':eval!/2

Affected — GitHub / ash-project/ash_lua Repository ↗

8675e47 < c0dfcd9 affected
every other version: unaffected
cpe cpe:2.3:a:ash-project:ash_lua:*:*:*:*:*:*:*:*
modules · source files · routines
modules 'Elixir.AshLua.Runtime'
source files lib/ash_lua/runtime.ex
routines 'Elixir.AshLua.Runtime':eval!/2

Configurations

Reachable only when an application exposes AshLua scripting (the AshLua.Resource / AshLua.Domain extensions) to callers who can submit or influence Lua scripts, and the exposed resource has attributes that are not on the exposed-field surface.

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:P/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
« All CVEs