{"id":"CVE-2026-70395","state":"PUBLISHED","title":"Predicate injection in manage_relationship belongs_to lookup discloses secret lookup keys in Ash","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.\n\nWhen 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.\n\nThis issue affects ash: from 1.52.0-rc.11 before 3.31.1.","publishedAt":"2026-08-09T18:17:07.321Z","updatedAt":"2026-08-10T18:23:15.009Z","severity":{"score":2.1,"label":"Low","version":"4.0","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","source":"EEF"},"assigner":"EEF","products":["ash-project ash"],"affected":[{"vendor":"ash-project","product":"ash","packageName":"ash","packageURL":"pkg:hex/ash","defaultStatus":"unaffected","versions":[{"version":"1.52.0-rc.11","status":"affected","lessThan":"3.31.1","versionType":"semver"}],"collectionURL":"https://repo.hex.pm","cpes":["cpe:2.3:a:ash-project:ash:*:*:*:*:*:*:*:*"],"modules":["'Elixir.Ash.Actions.ManagedRelationships'","'Elixir.Ash.Changeset'"],"programFiles":["lib/ash/actions/managed_relationships.ex","lib/ash/changeset/changeset.ex"],"programRoutines":[{"name":"'Elixir.Ash.Actions.ManagedRelationships':setup_managed_belongs_to_relationships/3"},{"name":"'Elixir.Ash.Changeset':manage_relationship/4"}],"repo":"https://github.com/ash-project/ash"},{"vendor":"ash-project","product":"ash","packageName":"ash-project/ash","packageURL":"pkg:github/ash-project/ash","defaultStatus":"unaffected","versions":[{"version":"571c138140e71cea24005189f45d7a63c8d2ed20","status":"affected","lessThan":"09f42593035bceb0f6153dd7ee45cc49d108300a","versionType":"git"}],"collectionURL":"https://github.com","cpes":["cpe:2.3:a:ash-project:ash:*:*:*:*:*:*:*:*"],"modules":["'Elixir.Ash.Actions.ManagedRelationships'","'Elixir.Ash.Changeset'"],"programFiles":["lib/ash/actions/managed_relationships.ex","lib/ash/changeset/changeset.ex"],"programRoutines":[{"name":"'Elixir.Ash.Actions.ManagedRelationships':setup_managed_belongs_to_relationships/3"},{"name":"'Elixir.Ash.Changeset':manage_relationship/4"}],"repo":"https://github.com/ash-project/ash"}],"references":["https://github.com/ash-project/ash/security/advisories/GHSA-vvp6-3wv6-833j","https://cna.erlef.org/cves/CVE-2026-70395.html","https://osv.dev/vulnerability/EEF-CVE-2026-70395","https://github.com/ash-project/ash/commit/09f42593035bceb0f6153dd7ee45cc49d108300a"],"weaknesses":["CWE-943"],"ingestedAt":"2026-10-29T20:12:49.727Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/70xxx/CVE-2026-70395.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-70395","state":"PUBLISHED","datePublished":"2026-08-09T18:17:07.321Z","dateUpdated":"2026-08-10T18:23:15.009Z","assignerShortName":"EEF","assignerOrgId":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","dateReserved":"2026-08-04T14:30:01.369Z"},"containers":{"cna":{"title":"Predicate injection in manage_relationship belongs_to lookup discloses secret lookup keys in Ash","descriptions":[{"lang":"en","value":"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.\n\nWhen 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.\n\nThis issue affects ash: from 1.52.0-rc.11 before 3.31.1."}],"affected":[{"vendor":"ash-project","product":"ash","packageName":"ash","packageURL":"pkg:hex/ash","defaultStatus":"unaffected","versions":[{"version":"1.52.0-rc.11","status":"affected","lessThan":"3.31.1","versionType":"semver"}],"collectionURL":"https://repo.hex.pm","cpes":["cpe:2.3:a:ash-project:ash:*:*:*:*:*:*:*:*"],"modules":["'Elixir.Ash.Actions.ManagedRelationships'","'Elixir.Ash.Changeset'"],"programFiles":["lib/ash/actions/managed_relationships.ex","lib/ash/changeset/changeset.ex"],"programRoutines":[{"name":"'Elixir.Ash.Actions.ManagedRelationships':setup_managed_belongs_to_relationships/3"},{"name":"'Elixir.Ash.Changeset':manage_relationship/4"}],"repo":"https://github.com/ash-project/ash"},{"vendor":"ash-project","product":"ash","packageName":"ash-project/ash","packageURL":"pkg:github/ash-project/ash","defaultStatus":"unaffected","versions":[{"version":"571c138140e71cea24005189f45d7a63c8d2ed20","status":"affected","lessThan":"09f42593035bceb0f6153dd7ee45cc49d108300a","versionType":"git"}],"collectionURL":"https://github.com","cpes":["cpe:2.3:a:ash-project:ash:*:*:*:*:*:*:*:*"],"modules":["'Elixir.Ash.Actions.ManagedRelationships'","'Elixir.Ash.Changeset'"],"programFiles":["lib/ash/actions/managed_relationships.ex","lib/ash/changeset/changeset.ex"],"programRoutines":[{"name":"'Elixir.Ash.Actions.ManagedRelationships':setup_managed_belongs_to_relationships/3"},{"name":"'Elixir.Ash.Changeset':manage_relationship/4"}],"repo":"https://github.com/ash-project/ash"}],"references":[{"url":"https://github.com/ash-project/ash/security/advisories/GHSA-vvp6-3wv6-833j","tags":["related","vendor-advisory"]},{"url":"https://cna.erlef.org/cves/CVE-2026-70395.html","tags":["related"]},{"url":"https://osv.dev/vulnerability/EEF-CVE-2026-70395","tags":["related"]},{"url":"https://github.com/ash-project/ash/commit/09f42593035bceb0f6153dd7ee45cc49d108300a","tags":["patch"]}],"metrics":[{"cvssV4_0":{"Automatable":"NOT_DEFINED","Recovery":"NOT_DEFINED","Safety":"NOT_DEFINED","attackComplexity":"LOW","attackRequirements":"PRESENT","attackVector":"LOCAL","baseScore":2.1,"baseSeverity":"LOW","privilegesRequired":"NONE","providerUrgency":"NOT_DEFINED","subAvailabilityImpact":"NONE","subConfidentialityImpact":"NONE","subIntegrityImpact":"NONE","userInteraction":"NONE","valueDensity":"NOT_DEFINED","vectorString":"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","version":"4.0","vulnAvailabilityImpact":"NONE","vulnConfidentialityImpact":"LOW","vulnIntegrityImpact":"LOW","vulnerabilityResponseEffort":"NOT_DEFINED"},"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}]}],"problemTypes":[{"descriptions":[{"cweId":"CWE-943","description":"CWE-943 Improper Neutralization of Special Elements in Data Query Logic","lang":"en","type":"CWE"}]}],"providerMetadata":{"shortName":"EEF","orgId":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","dateUpdated":"2026-08-09T18:17:07.321Z"},"configurations":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<p>A <code>belongs_to</code> relationship must be managed with <code>manage_relationship</code> using <code>on_lookup: :relate</code>, and the lookup value must come from client input.</p>"},{"base64":false,"type":"text/markdown","value":"A `belongs_to` relationship must be managed with `manage_relationship` using `on_lookup: :relate`, and the lookup value must come from client input."}],"value":"A belongs_to relationship must be managed with manage_relationship using on_lookup: :relate, and the lookup value must come from client input."}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:a:ash-project:ash:*:*:*:*:*:*:*:*","versionEndExcluding":"3.31.1","versionStartIncluding":"1.52.0-rc.11","vulnerable":true}],"negate":false,"operator":"OR"}],"operator":"AND"}],"credits":[{"lang":"en","type":"finder","value":"Jisung Chae"},{"lang":"en","type":"remediation developer","value":"Zach Daniel"},{"lang":"en","type":"analyst","value":"Jonatan Männchen / EEF"}],"impacts":[{"capecId":"CAPEC-116","descriptions":[{"lang":"en","value":"CAPEC-116 Excavation"}]}],"source":{"discovery":"EXTERNAL"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-08-10T15:56:57.175785Z","id":"CVE-2026-70395","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-08-10T18:23:15.009Z"}}]}}}