{"id":"CVE-2026-8467","aliases":["CVE-2026-8467","GHSA-55hg-8qxv-qj4p","EEF-CVE-2026-8467"],"related":[],"kind":"vulnerability","state":"published","title":"Unauthenticated remote code execution via HEEx template injection in phoenix_storybook playground","summary":"Code Injection vulnerability in phenixdigital phoenix_storybook allows unauthenticated remote code execution via HEEx template injection in the component playground. A client can send attribute values over the playground WebSocket. A value that closes the attribute quote and adds a HEEx expression is evaluated as Elixir code on the server.\n\nPhoenixStorybook.Story.PlaygroundPreviewLive.handle_event/3 accepts attribute names and values from the client and stores them through PhoenixStorybook.ExtraAssignsHelpers.handle_set_variation_assign/3. PhoenixStorybook.Rendering.ComponentRenderer.attributes_markup/1 interpolates string values into a HEEx template without escaping. The template is compiled with EEx.compile_string/2 and evaluated. Releases published as phx_live_storybook have the same code in the PhxLiveStorybook namespace, where the first client entry point is PhxLiveStorybook.Entry.Playground.handle_event/3.\n\nThis issue affects phoenix_storybook: from 0.5.0 before 1.1.0; phx_live_storybook: from 0.3.0 onward.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Code Injection vulnerability in phenixdigital phoenix_storybook allows unauthenticated remote code execution via HEEx template injection in the component playground. A client can send attribute values over the playground WebSocket. A value that closes the attribute quote and adds a HEEx expression is evaluated as Elixir code on the server.\n\nPhoenixStorybook.Story.PlaygroundPreviewLive.handle_event/3 accepts attribute names and values from the client and stores them through PhoenixStorybook.ExtraAssignsHelpers.handle_set_variation_assign/3. PhoenixStorybook.Rendering.ComponentRenderer.attributes_markup/1 interpolates string values into a HEEx template without escaping. The template is compiled with EEx.compile_string/2 and evaluated. Releases published as phx_live_storybook have the same code in the PhxLiveStorybook namespace, where the first client entry point is PhxLiveStorybook.Entry.Playground.handle_event/3.\n\nThis issue affects phoenix_storybook: from 0.5.0 before 1.1.0; phx_live_storybook: from 0.3.0 onward.","source":"cvelist"},{"lang":"en","text":"### Summary\nAn unsafe HEEx template generation vulnerability allows any unauthenticated user to execute arbitrary code on the server. The phoenix_storybook playground accepts user-controlled attribute values over WebSocket and interpolates them unsanitized into a HEEx template that is subsequently compiled and evaluated with full Elixir `Kernel` access.\n\n### Details\nThe vulnerability is a three-step chain:\n\n**1. Unsanitized WebSocket input (`extra_assigns_helpers.ex`)**\nThe `psb-assign` event handler in `PhoenixStorybook.Story.PlaygroundPreviewLive` accepts arbitrary attribute names and values from unauthenticated WebSocket clients and  stores them verbatim via `ExtraAssignsHelpers.handle_set_variation_assign/3`.\n\n**2. Unescaped interpolation into HEEx (`component_renderer.ex`)**\n`ComponentRenderer.attributes_markup/1` builds a HEEx template string by interpolating binary attribute values directly:\n```elixir\n{name, val} when is_binary(val) ->\n  ~s|#{name}=\"#{val}\"|\n```\nNo escaping of `\"` or `{` is performed. A value such as `foo\" injected={EXPR} bar=\"` breaks out of the attribute string and injects `EXPR` as an inline HEEx expression.\n\n**3. Unsandboxed evaluation (`component_renderer.ex`)**\nThe resulting HEEx string is compiled via `EEx.compile_string/2` and evaluated via `Code.eval_quoted_with_env/3` with full `Kernel` imports and no sandbox. The injected expression executes on the server even if it causes a rendering error.\n\n### PoC\n1. Identify any story URL with a Playground tab (e.g. `/storybook/core_components/button`).\n2. Connect to the Phoenix LiveView WebSocket without any authentication.\n3. Join the story's LiveView channel and send a `psb-assign` event with an attribute value that escapes the HEEx attribute context and embeds an Elixir expression (e.g. a `System.cmd/2` call).\n4. The server evaluates the injected expression and returns its output in the rendered response.\n\nNo authentication, no special configuration, and no user interaction are required.\n\n### Impact\nThis is a pre-authentication remote code execution vulnerability. Any user able to reach the storybook endpoint, including unauthenticated internet users if the storybook is publicly deployed, can execute arbitrary operating system commands with the privileges of the server process. All versions of `phoenix_storybook` from 0.5.0 before 1.1.0 are affected.\n\n## Resources\n\n* Introduction Commit: https://github.com/phenixdigital/phoenix_storybook/commit/e35379dfe2ef1a71b141899e36f431017c55265d\n* Patch Commit: https://github.com/phenixdigital/phoenix_storybook/commit/56ab8464d4375fa52db806148a06cce126ad481d","format":"markdown","source":"ghsa"},{"lang":"en","text":"## Summary\n\nCode Injection vulnerability in phenixdigital phoenix_storybook allows unauthenticated remote code execution via HEEx template injection in the component playground. A client can send attribute values over the playground WebSocket. A value that closes the attribute quote and adds a HEEx expression is evaluated as Elixir code on the server.\n\n`PhoenixStorybook.Story.PlaygroundPreviewLive.handle_event/3` accepts attribute names and values from the client and stores them through `PhoenixStorybook.ExtraAssignsHelpers.handle_set_variation_assign/3`. `PhoenixStorybook.Rendering.ComponentRenderer.attributes_markup/1` interpolates string values into a HEEx template without escaping. The template is compiled with `EEx.compile_string/2` and evaluated. Releases published as `phx_live_storybook` have the same code in the `PhxLiveStorybook` namespace, where the first client entry point is `PhxLiveStorybook.Entry.Playground.handle_event/3`.\n\nThis issue affects phoenix_storybook: from 0.5.0 before 1.1.0; phx_live_storybook: from 0.3.0 onward.","format":"markdown","source":"eef"},{"lang":"es","text":"Vulnerabilidad de inyección de código en phenixdigital phoenix_storybook permite la ejecución remota de código no autenticada a través de la interpolación de valores de atributos no saneados en la generación de plantillas HEEx.\n\nEl gestor de eventos WebSocket psb-assign en 'Elixir.PhoenixStorybook.Story.PlaygroundPreviewLive':handle_event/3 acepta nombres y valores de atributos arbitrarios de clientes no autenticados. Estos valores se pasan a 'Elixir.PhoenixStorybook.Helpers.ExtraAssignsHelpers':handle_set_variation_assign/3, que los almacena textualmente. Al renderizar, 'Elixir.PhoenixStorybook.Rendering.ComponentRenderer':attributes_markup/1 interpola valores de atributos binarios directamente en una cadena de plantilla HEEx como name=\"<val>\" sin escapar las comillas dobles o los delimitadores de expresión HEEx. Un atacante puede proporcionar un valor que contenga una comilla de cierre seguida de un bloque de expresión HEEx (p. ej., foo\" injected={EXPR} bar=\"), lo que hace que EXPR sea tratado como una expresión Elixir en línea. La plantilla resultante se compila a través de EEx.compile_string/2 y se ejecuta a través de Code.eval_quoted_with_env/3 con importaciones completas del Kernel y sin sandbox, lo que le da al atacante ejecución de código arbitrario en el servidor.\n\nEste problema afecta a phoenix_storybook desde 0.5.0 antes de 1.1.0.","source":"nvd"}],"published":"2026-05-20T13:35:29.018Z","modified":"2026-11-26T17:23:13.721Z","severity":{"scorer":"EEF","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H","score":9.5,"rating":"CRITICAL"},"severities":[{"scorer":"EEF","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H","score":9.5,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H","rating":"CRITICAL"},{"scorer":"Erlang Ecosystem Foundation","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H"}],"cwes":["CWE-94"],"affected":[{"ranges":[{"type":"semver","introduced":"0.5.0","fixed":"1.1.0","status":"affected"}],"vendor":"phenixdigital","product":"phoenix_storybook","package":"phoenix_storybook","cpe":"cpe:2.3:a:phenixdigital:phoenix_storybook:*:*:*:*:*:*:*:*","repo":"https://github.com/phenixdigital/phoenix_storybook","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0.3.0","fixed":"*","status":"affected"}],"vendor":"phenixdigital","product":"phoenix_storybook","package":"phx_live_storybook","cpe":"cpe:2.3:a:phenixdigital:phoenix_storybook:*:*:*:*:*:*:*:*","repo":"https://github.com/phenixdigital/phoenix_storybook","source":"cvelist"},{"ranges":[{"type":"git","introduced":"e35379dfe2ef1a71b141899e36f431017c55265d","fixed":"56ab8464d4375fa52db806148a06cce126ad481d","status":"affected"}],"vendor":"phenixdigital","product":"phoenix_storybook","package":"phenixdigital/phoenix_storybook","cpe":"cpe:2.3:a:phenixdigital:phoenix_storybook:*:*:*:*:*:*:*:*","repo":"https://github.com/phenixdigital/phoenix_storybook","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0.5.0","status":"affected","fixed":"1.1.0"}],"ecosystem":"Hex","package":"phoenix_storybook","purl":"pkg:hex/phoenix_storybook","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0.5.0","status":"affected","fixed":"1.1.0"}],"ecosystem":"Hex","package":"phoenix_storybook","purl":"pkg:hex/phoenix_storybook","source":"eef"},{"ranges":[{"type":"semver","introduced":"0.3.0","status":"affected"}],"ecosystem":"Hex","package":"phx_live_storybook","purl":"pkg:hex/phx_live_storybook","source":"eef"},{"ranges":[{"type":"git","introduced":"e35379dfe2ef1a71b141899e36f431017c55265d","status":"affected","fixed":"56ab8464d4375fa52db806148a06cce126ad481d"}],"repo":"https://github.com/phenixdigital/phoenix_storybook","source":"eef"}],"references":[{"url":"https://github.com/phenixdigital/phoenix_storybook/security/advisories/GHSA-55hg-8qxv-qj4p","tags":["advisory","exploit","related","vendor-advisory","web"],"sources":["cvelist","ghsa","eef","nvd"]},{"url":"https://cna.erlef.org/cves/CVE-2026-8467.html","tags":["related","web"],"sources":["cvelist","ghsa","eef","nvd"]},{"url":"https://osv.dev/vulnerability/EEF-CVE-2026-8467","tags":["related","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/phenixdigital/phoenix_storybook/commit/e35379dfe2ef1a71b141899e36f431017c55265d","tags":["related","web"],"sources":["cvelist","eef","nvd"]},{"url":"https://github.com/phenixdigital/phoenix_storybook/commit/56ab8464d4375fa52db806148a06cce126ad481d","tags":["fix","patch","web"],"sources":["cvelist","ghsa","eef","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-8467","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/phenixdigital/phoenix_storybook","tags":["package"],"sources":["ghsa"]},{"url":"https://hex.pm/packages/phoenix_storybook","tags":["package"],"sources":["eef"]},{"url":"https://hex.pm/packages/phx_live_storybook","tags":["package"],"sources":["eef"]}],"credits":["Nick Mykhailyshyn","Cenk Kücük","Jonatan Männchen / EEF","Christian Blavier"],"assigner":"EEF","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"total","date":"2026-05-21T13:57:52.803Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-8467","url":"https://www.cve.org/CVERecord?id=CVE-2026-8467","licence":"CVE Terms of Use","modified":"2026-11-20T06:26:08.967Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-55hg-8qxv-qj4p","url":"https://github.com/advisories/GHSA-55hg-8qxv-qj4p","licence":"CC-BY-4.0","modified":"2026-06-09T22:15:08.050Z"},{"source":"eef","name":"Erlang Ecosystem Foundation","id":"EEF-CVE-2026-8467","url":"https://osv.dev/vulnerability/EEF-CVE-2026-8467","licence":"CC-BY-4.0","modified":"2026-11-26T17:23:13.721Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-8467","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-8467","licence":"Public domain","modified":"2026-11-20T07:17:17.527Z"}],"updatedAt":"2026-11-26T17:37:17.159Z","epss":{"score":0.02912,"percentile":0.87367,"date":"2026-12-01T12:00:22.000Z"}}