{"id":"CVE-2026-77956","state":"PUBLISHED","title":"EEx template evaluation of prompt content in AshAi enables remote code execution","description":"Improper Control of Generation of Code (Code Injection) vulnerability in ash-project ash_ai allows a remote, unauthenticated client to execute arbitrary Elixir code.\n\nAshAi.Actions.Prompt evaluates prompt content through EEx.eval_string/2. The documented prompt: fn input, context -> ... end form lets the prompt content be built from action arguments, so when a prompt action's text incorporates request data, that attacker-controlled text is compiled and run as an EEx template (Elixir source). Content such as <%= System.cmd(...) %> therefore executes on the server before any model request is made, requiring no authentication beyond reaching a prompt action. The fix stops evaluating function-supplied prompt content as EEx; only statically configured templates are evaluated.\n\nThis issue affects ash_ai: from 0.1.0 before 1.0.0.","publishedAt":"2026-08-31T00:56:26.440Z","updatedAt":"2026-08-31T16:01:41.879Z","severity":{"score":8.9,"label":"High","version":"4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H","source":"EEF"},"assigner":"EEF","products":["ash-project ash_ai"],"affected":[{"vendor":"ash-project","product":"ash_ai","packageName":"ash_ai","packageURL":"pkg:hex/ash_ai","defaultStatus":"unaffected","versions":[{"version":"0.1.0","status":"affected","lessThan":"1.0.0","versionType":"semver"}],"collectionURL":"https://repo.hex.pm","cpes":["cpe:2.3:a:ash-project:ash_ai:*:*:*:*:*:*:*:*"],"modules":["'Elixir.AshAi.Actions.Prompt'"],"programFiles":["lib/ash_ai/actions/prompt.ex"],"programRoutines":[{"name":"'Elixir.AshAi.Actions.Prompt':build_context/3"}],"repo":"https://github.com/ash-project/ash_ai"},{"vendor":"ash-project","product":"ash_ai","packageName":"ash-project/ash_ai","packageURL":"pkg:github/ash-project/ash_ai","defaultStatus":"unaffected","versions":[{"version":"4aab131d40a0bd5a8cf0b3c4eaaa59d49565f3d1","status":"affected","lessThan":"e9948254b5659c1143b73dc2f59f457931e64514","versionType":"git"}],"collectionURL":"https://github.com","cpes":["cpe:2.3:a:ash-project:ash_ai:*:*:*:*:*:*:*:*"],"modules":["'Elixir.AshAi.Actions.Prompt'"],"programFiles":["lib/ash_ai/actions/prompt.ex"],"programRoutines":[{"name":"'Elixir.AshAi.Actions.Prompt':build_context/3"}],"repo":"https://github.com/ash-project/ash_ai"}],"references":["https://github.com/ash-project/ash_ai/security/advisories/GHSA-2g59-hg7m-qc83","https://cna.erlef.org/cves/CVE-2026-77956.html","https://osv.dev/vulnerability/EEF-CVE-2026-77956","https://github.com/ash-project/ash_ai/commit/e9948254b5659c1143b73dc2f59f457931e64514"],"weaknesses":["CWE-94"],"ingestedAt":"2026-10-29T20:13:07.220Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/77xxx/CVE-2026-77956.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-77956","state":"PUBLISHED","datePublished":"2026-08-31T00:56:26.440Z","dateUpdated":"2026-08-31T16:01:41.879Z","assignerShortName":"EEF","assignerOrgId":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","dateReserved":"2026-08-30T17:30:01.409Z"},"containers":{"cna":{"title":"EEx template evaluation of prompt content in AshAi enables remote code execution","descriptions":[{"lang":"en","value":"Improper Control of Generation of Code (Code Injection) vulnerability in ash-project ash_ai allows a remote, unauthenticated client to execute arbitrary Elixir code.\n\nAshAi.Actions.Prompt evaluates prompt content through EEx.eval_string/2. The documented prompt: fn input, context -> ... end form lets the prompt content be built from action arguments, so when a prompt action's text incorporates request data, that attacker-controlled text is compiled and run as an EEx template (Elixir source). Content such as <%= System.cmd(...) %> therefore executes on the server before any model request is made, requiring no authentication beyond reaching a prompt action. The fix stops evaluating function-supplied prompt content as EEx; only statically configured templates are evaluated.\n\nThis issue affects ash_ai: from 0.1.0 before 1.0.0."}],"affected":[{"vendor":"ash-project","product":"ash_ai","packageName":"ash_ai","packageURL":"pkg:hex/ash_ai","defaultStatus":"unaffected","versions":[{"version":"0.1.0","status":"affected","lessThan":"1.0.0","versionType":"semver"}],"collectionURL":"https://repo.hex.pm","cpes":["cpe:2.3:a:ash-project:ash_ai:*:*:*:*:*:*:*:*"],"modules":["'Elixir.AshAi.Actions.Prompt'"],"programFiles":["lib/ash_ai/actions/prompt.ex"],"programRoutines":[{"name":"'Elixir.AshAi.Actions.Prompt':build_context/3"}],"repo":"https://github.com/ash-project/ash_ai"},{"vendor":"ash-project","product":"ash_ai","packageName":"ash-project/ash_ai","packageURL":"pkg:github/ash-project/ash_ai","defaultStatus":"unaffected","versions":[{"version":"4aab131d40a0bd5a8cf0b3c4eaaa59d49565f3d1","status":"affected","lessThan":"e9948254b5659c1143b73dc2f59f457931e64514","versionType":"git"}],"collectionURL":"https://github.com","cpes":["cpe:2.3:a:ash-project:ash_ai:*:*:*:*:*:*:*:*"],"modules":["'Elixir.AshAi.Actions.Prompt'"],"programFiles":["lib/ash_ai/actions/prompt.ex"],"programRoutines":[{"name":"'Elixir.AshAi.Actions.Prompt':build_context/3"}],"repo":"https://github.com/ash-project/ash_ai"}],"references":[{"url":"https://github.com/ash-project/ash_ai/security/advisories/GHSA-2g59-hg7m-qc83","tags":["vendor-advisory","related"]},{"url":"https://cna.erlef.org/cves/CVE-2026-77956.html","tags":["related"]},{"url":"https://osv.dev/vulnerability/EEF-CVE-2026-77956","tags":["related"]},{"url":"https://github.com/ash-project/ash_ai/commit/e9948254b5659c1143b73dc2f59f457931e64514","tags":["patch"]}],"metrics":[{"cvssV4_0":{"Automatable":"NOT_DEFINED","Recovery":"NOT_DEFINED","Safety":"NOT_DEFINED","attackComplexity":"LOW","attackRequirements":"PRESENT","attackVector":"LOCAL","baseScore":8.9,"baseSeverity":"HIGH","privilegesRequired":"NONE","providerUrgency":"NOT_DEFINED","subAvailabilityImpact":"HIGH","subConfidentialityImpact":"HIGH","subIntegrityImpact":"HIGH","userInteraction":"NONE","valueDensity":"NOT_DEFINED","vectorString":"CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H","version":"4.0","vulnAvailabilityImpact":"HIGH","vulnConfidentialityImpact":"HIGH","vulnIntegrityImpact":"HIGH","vulnerabilityResponseEffort":"NOT_DEFINED"},"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}]}],"problemTypes":[{"descriptions":[{"cweId":"CWE-94","description":"CWE-94 Improper Control of Generation of Code ('Code Injection')","lang":"en","type":"CWE"}]}],"providerMetadata":{"shortName":"EEF","orgId":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","dateUpdated":"2026-08-31T15:08:21.204Z"},"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:a:ash-project:ash_ai:*:*:*:*:*:*:*:*","versionEndExcluding":"1.0.0","versionStartIncluding":"0.1.0","vulnerable":true}],"negate":false,"operator":"OR"}],"operator":"AND"}],"credits":[{"lang":"en","type":"finder","value":"Peter Ullrich"},{"lang":"en","type":"reporter","value":"Peter Ullrich"},{"lang":"en","type":"remediation developer","value":"Zach Daniel / Ash Project"},{"lang":"en","type":"coordinator","value":"Jonatan Männchen / EEF"}],"impacts":[{"capecId":"CAPEC-242","descriptions":[{"lang":"en","value":"CAPEC-242 Code Injection"}]}],"source":{"discovery":"EXTERNAL"}},"adp":[{"title":"CISA ADP Vulnrichment","references":[{"url":"https://github.com/ash-project/ash_ai/security/advisories/GHSA-2g59-hg7m-qc83","tags":["exploit"]}],"metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-08-31T16:01:20.485407Z","id":"CVE-2026-77956","options":[{"Exploitation":"poc"},{"Automatable":"no"},{"Technical Impact":"total"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-08-31T16:01:41.879Z"}}]}}}