CVE-2026-8467: PhoenixStorybook Remote Code Execution Vulnerability
CRITICALCVE-2026-8467 is a CRITICAL remote code execution vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting PhoenixStorybook libraries in the Hex ecosystem. The issue involves unauthenticated remote code execution via heex template injection in phoenix_storybook playground. Remediation is available by upgrading affected packages to version 1.1.0.
CVE-2026-8467 at a Glance
How to Fix CVE-2026-8467
To remediate this vulnerability, upgrade all affected PhoenixStorybook dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade phoenix_storybook to 1.1.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for phoenix_storybook
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-8467, inspect your project dependencies for PhoenixStorybook:
inspect dependencies for phoenix_storybook
Analyze the terminal output to locate any version of PhoenixStorybook in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.1.0), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-94: Improper Control of Generation of Code ('Code Injection'), where the product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. In PhoenixStorybook, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-8467 Affected PhoenixStorybook Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
phoenix_storybook
|
Hex |
≥ 0.5.0
< 1.1.0
|
1.1.0
|
References
Frequently Asked Questions
What is CVE-2026-8467?
Which PhoenixStorybook versions are affected?
What version fixes CVE-2026-8467?
Is phoenix_storybook affected?
What CWE is associated with CVE-2026-8467?
How can I check Hex dependencies for CVE-2026-8467?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-55hg-8qxv-qj4p",
"modified" : "2026-06-09T21:58:57Z",
"published" : "2026-06-09T21:58:57Z",
"aliases" : [ "CVE-2026-8467" ],
"summary" : "PhoenixStorybook: Unauthenticated remote code execution via HEEx template injection in phoenix_storybook playground",
"details" : "### 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",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "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"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Hex",
"name" : "phoenix_storybook"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.5.0"
}, {
"fixed" : "1.1.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/phenixdigital/phoenix_storybook/security/advisories/GHSA-55hg-8qxv-qj4p"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-8467"
}, {
"type" : "WEB",
"url" : "https://github.com/phenixdigital/phoenix_storybook/commit/56ab8464d4375fa52db806148a06cce126ad481d"
}, {
"type" : "WEB",
"url" : "https://cna.erlef.org/cves/CVE-2026-8467.html"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/phenixdigital/phoenix_storybook"
}, {
"type" : "WEB",
"url" : "https://osv.dev/vulnerability/EEF-CVE-2026-8467"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-94" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2026-06-09T21:58:57Z",
"nvd_published_at" : "2026-05-20T14:17:04Z"
}
}