Summary
PhoenixStorybook: Unauthenticated remote code execution via HEEx template injection in phoenix_storybook playground
An 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.
Details
The vulnerability is a three-step chain:
1. Unsanitized WebSocket input (extra_assigns_helpers.ex)
The 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.
2. Unescaped interpolation into HEEx (component_renderer.ex)ComponentRenderer.attributes_markup/1 builds a HEEx template string by interpolating binary attribute values directly:
{name, val} when is_binary(val) ->
~s|#{name}="#{val}"|
No 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.
3. Unsandboxed evaluation (component_renderer.ex)
The 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.
PoC
- Identify any story URL with a Playground tab (e.g.
/storybook/core_components/button). - Connect to the Phoenix LiveView WebSocket without any authentication.
- Join the story's LiveView channel and send a
psb-assignevent with an attribute value that escapes the HEEx attribute context and embeds an Elixir expression (e.g. aSystem.cmd/2call). - The server evaluates the injected expression and returns its output in the rendered response.
No authentication, no special configuration, and no user interaction are required.
Resources
Impact
This 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.
Untrusted input is evaluated as executable code within the application's runtime environment. Typical impact: arbitrary code execution within the application's privilege context.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Already deployed Kodem?
See it in your environmentNew to Kodem? Get a demo →Remediation advice
Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.
Frequently Asked Questions
- What is CVE-2026-8467? CVE-2026-8467 is a critical-severity code injection vulnerability in phoenix_storybook (erlang), affecting versions >= 0.5.0, < 1.1.0. It is fixed in 1.1.0. Untrusted input is evaluated as executable code within the application's runtime environment.
- Which versions of phoenix_storybook are affected by CVE-2026-8467? phoenix_storybook (erlang) versions >= 0.5.0, < 1.1.0 is affected.
- Is there a fix for CVE-2026-8467? Yes. CVE-2026-8467 is fixed in 1.1.0. Upgrade to this version or later.
- Is CVE-2026-8467 exploitable, and should I be worried? Whether CVE-2026-8467 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2026-8467 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2026-8467? Upgrade
phoenix_storybookto 1.1.0 or later.