CVE-2026-70395
JSON

2.1low

Predicate injection in manage_relationship belongs_to lookup discloses secret lookup keys in Ash

Severity
2.1low CVSS:4.0 by EEF
Exploit likelihood
0.14% (higher than 3% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
EEF
Also known as
EEF-CVE-2026-70395GHSA-vvp6-3wv6-833j

Description

Improper Neutralization of Special Elements in Data Query Logic vulnerability in ash-project ash allows an attacker to forge a relationship to a record they cannot name, and to recover the secret value used to look it up. When manage_relationship is used with on_lookup: :relate on a belongs_to relationship, the client-supplied lookup value is passed to Ash.Query.filter/2 without being cast to the attribute type. A nested map submitted where a scalar is expected is therefore interpreted as a filter predicate rather than a literal, so a lookup for a specific record becomes a query for any record matching a condition. The same path omits Ash.Query.limit(1), leaving Ash.read_one/2 able to distinguish no match from one match from several, which turns comparison predicates into an oracle for the lookup value. Authorization is unaffected; the destination read policy still applies. This issue affects ash: from 1.52.0-rc.11 before 3.31.1.

Affected

Product or packageVersionsReported by
ashfrom 1.52.0-rc.11 before 3.31.1CVE List
ash-project/ashfrom 571c138140e71cea24005189f45d7a63c8d2ed20 before 09f42593035bceb0f6153dd7ee45cc49d108300aCVE List
ash (Hex)from 1.52.0-rc.11 before 3.31.1Erlang Ecosystem Foundation
https://github.com/ash-project/ashfrom 571c138140e71cea24005189f45d7a63c8d2ed20 before 09f42593035bceb0f6153dd7ee45cc49d108300aErlang Ecosystem Foundation

All scores

EEF2.1low CVSS:4.0CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N
Erlang Ecosystem FoundationNot scored CVSS:4.0CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N

Classification

CWE-943

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

Improper Neutralization of Special Elements in Data Query Logic vulnerability in ash-project ash allows an attacker to forge a relationship to a record they cannot name, and to recover the secret value used to look it up. When manage_relationship is used with on_lookup: :relate on a belongs_to relationship, the client-supplied lookup value is passed to Ash.Query.filter/2 without being cast to the attribute type. A nested map submitted where a scalar is expected is therefore interpreted as a filter predicate rather than a literal, so a lookup for a specific record becomes a query for any record matching a condition. The same path omits Ash.Query.limit(1), leaving Ash.read_one/2 able to distinguish no match from one match from several, which turns comparison predicates into an oracle for the lookup value. Authorization is unaffected; the destination read policy still applies. This issue affects ash: from 1.52.0-rc.11 before 3.31.1.

Erlang Ecosystem Foundation

Summary

Improper Neutralization of Special Elements in Data Query Logic vulnerability in ash-project ash allows an attacker to forge a relationship to a record they cannot name, and to recover the secret value used to look it up.

When manage_relationship is used with on_lookup: :relate on a belongs_to relationship, the client-supplied lookup value is passed to Ash.Query.filter/2 without being cast to the attribute type. A nested map submitted where a scalar is expected is therefore interpreted as a filter predicate rather than a literal, so a lookup for a specific record becomes a query for any record matching a condition. The same path omits Ash.Query.limit(1), leaving Ash.read_one/2 able to distinguish no match from one match from several, which turns comparison predicates into an oracle for the lookup value. Authorization is unaffected; the destination read policy still applies.

This issue affects ash: from 1.52.0-rc.11 before 3.31.1.

Configurations

A belongs_to relationship must be managed with manage_relationship using on_lookup: :relate, and the lookup value must come from client input.

NVD (es)

vulnerabilidad de neutralización incorrecta de elementos especiales en la lógica de consulta de datos en ash-project ash permite a un atacante forjar una relación con un registro que no pueden nombrar, y recuperar el valor secreto utilizado para buscarlo. Cuando manage_relationship se utiliza con on_lookup: :relate en una relación belongs_to, el valor de búsqueda proporcionado por el cliente se pasa a Ash.Query.filter/2 sin ser convertido al tipo de atributo. Un mapa anidado enviado donde se espera un escalar se interpreta, por lo tanto, como un predicado de filtro en lugar de un literal, por lo que una búsqueda de un registro específico se convierte en una consulta para cualquier registro que coincida con una condición. La misma ruta omite Ash.Query.limit(1), dejando a Ash.read_one/2 capaz de distinguir ninguna coincidencia de una coincidencia de varias, lo que convierte los predicados de comparación en un oráculo para el valor de búsqueda. La autorización no se ve afectada; la política de lectura de destino sigue aplicándose. Este problema afecta a ash: desde 1.52.0-rc.11 antes de 3.31.1.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-70395 changed 2026-11-19CVE Terms of Use
Erlang Ecosystem FoundationEEF-CVE-2026-70395 changed 2026-11-26CC-BY-4.0
NVDCVE-2026-70395 changed 2026-11-19Public domain