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.
Published: 2026-08-09
Score: 2.1 Low
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The vulnerability arises from improper neutralization of special elements in data query logic (CWE-943). When the manage_relationship function is used with on_lookup: :relate, the client supplied lookup value is not cast to the correct attribute type before being passed to Ash.Query.filter. This allows a nested map to be interpreted as a predicate, turning a lookup for a specific record into a query that matches any record fulfilling that condition. The resulting query can reveal whether a particular secret lookup key exists, effectively exposing that key as an oracle for the lookup value. While the read policy still applies, no authorization is circumvented, yet the disclosure of the secret key can enable attackers to forge relationships and potentially gain further linkage to data within the system.

Affected Systems

Ash Project’s Ash product is affected in versions starting with 1.52.0‑rc.11 up to, and including, 3.31.1. All releases within this range are vulnerable.

Risk and Exploitability

The CVSS score of 2.1 indicates a low severity overall, and the EPSS score is not available. The vulnerability is not listed in the CISA KEV catalog. The likely attack vector is a remote attacker sending carefully crafted relationship creation requests through an exposed API or client interface. Successful exploitation would allow the attacker to recover the secret lookup key, but it does not grant broader privileges or bypass existing read policies.

Generated by OpenCVE AI on August 9, 2026 at 19:20 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Ash to version 3.31.1 or later, where the query casting bug has been fixed.
  • If an upgrade is not immediately possible, ensure that all client-supplied lookup values for on_lookup: :relate are explicitly cast to the correct attribute type before passing them to Ash.Query.filter, thereby preventing predicate injection.
  • Audit the application code to remove or tightly control any usage of manage_relationship with on_lookup: :relate that accepts untrusted input, and implement additional validation or authorization checks around relationship creation endpoints.

Generated by OpenCVE AI on August 9, 2026 at 19:20 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Sun, 09 Aug 2026 18:30:00 +0000

Type Values Removed Values Added
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.
Title Predicate injection in manage_relationship belongs_to lookup discloses secret lookup keys in Ash
First Time appeared Ash-project
Ash-project ash
Weaknesses CWE-943
CPEs cpe:2.3:a:ash-project:ash:*:*:*:*:*:*:*:*
Vendors & Products Ash-project
Ash-project ash
References
Metrics cvssV4_0

{'score': 2.1, 'vector': 'CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N'}


cve-icon MITRE

Status: PUBLISHED

Assigner: EEF

Published:

Updated: 2026-08-09T18:17:07.321Z

Reserved: 2026-08-04T14:30:01.369Z

Link: CVE-2026-70395

cve-icon Vulnrichment

No data.

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-09T19:30:04Z

Weaknesses
  • CWE-943

    Improper Neutralization of Special Elements in Data Query Logic