CVE-2026-8467: CWE-94 Improper Control of Generation of Code ('Code Injection') in phenixdigital phoenix_storybook
Code Injection vulnerability in phenixdigital phoenix_storybook allows unauthenticated remote code execution via unsanitized attribute value interpolation in HEEx template generation. The psb-assign WebSocket event handler in 'Elixir.PhoenixStorybook.Story.PlaygroundPreviewLive':handle_event/3 accepts arbitrary attribute names and values from unauthenticated clients. These values are passed to 'Elixir.PhoenixStorybook.Helpers.ExtraAssignsHelpers':handle_set_variation_assign/3, which stores them verbatim. When rendering, 'Elixir.PhoenixStorybook.Rendering.ComponentRenderer':attributes_markup/1 interpolates binary attribute values directly into a HEEx template string as name="<val>" without escaping double quotes or HEEx expression delimiters. An attacker can supply a value containing a closing quote followed by a HEEx expression block (e.g.foo" injected={EXPR} bar="), which causes EXPR to be treated as an inline Elixir expression. The resulting template is compiled via EEx.compile_string/2 and executed via Code.eval_quoted_with_env/3 with full Kernel imports and no sandbox, giving the attacker arbitrary code execution on the server. This issue affects phoenix_storybook from 0.5.0 before 1.1.0.
AI Analysis
Technical Summary
The vulnerability exists in the psb-assign WebSocket event handler within 'Elixir.PhoenixStorybook.Story.PlaygroundPreviewLive':handle_event/3, which accepts arbitrary attribute names and values from unauthenticated clients. These values are stored verbatim by 'Elixir.PhoenixStorybook.Helpers.ExtraAssignsHelpers':handle_set_variation_assign/3. During rendering, 'Elixir.PhoenixStorybook.Rendering.ComponentRenderer':attributes_markup/1 interpolates these values directly into HEEx template strings as name="<val>" without escaping double quotes or HEEx expression delimiters. An attacker can craft a value containing a closing quote followed by a HEEx expression block, causing the expression to be compiled and executed with full privileges via EEx.compile_string/2 and Code.eval_quoted_with_env/3. This results in unauthenticated remote code execution on the server hosting phoenix_storybook versions prior to 1.1.0.
Potential Impact
Successful exploitation allows unauthenticated remote attackers to execute arbitrary code on the server with full Kernel imports and no sandbox restrictions. This can lead to complete compromise of the affected system, including data theft, service disruption, or further network penetration. The CVSS 4.0 base score is 9.5, indicating a critical severity with network attack vector, low attack complexity, no privileges required, no user interaction, and high impacts on confidentiality, integrity, availability, and security requirements.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. No official fix or patch links are provided in the available data. Until a patch is released, avoid exposing the vulnerable phoenix_storybook versions to untrusted networks or unauthenticated users. Monitor vendor communications for updates on remediation. Do not rely on generic mitigations as the vulnerability specifically involves unsanitized HEEx template interpolation.
CVE-2026-8467: CWE-94 Improper Control of Generation of Code ('Code Injection') in phenixdigital phoenix_storybook
Description
Code Injection vulnerability in phenixdigital phoenix_storybook allows unauthenticated remote code execution via unsanitized attribute value interpolation in HEEx template generation. The psb-assign WebSocket event handler in 'Elixir.PhoenixStorybook.Story.PlaygroundPreviewLive':handle_event/3 accepts arbitrary attribute names and values from unauthenticated clients. These values are passed to 'Elixir.PhoenixStorybook.Helpers.ExtraAssignsHelpers':handle_set_variation_assign/3, which stores them verbatim. When rendering, 'Elixir.PhoenixStorybook.Rendering.ComponentRenderer':attributes_markup/1 interpolates binary attribute values directly into a HEEx template string as name="<val>" without escaping double quotes or HEEx expression delimiters. An attacker can supply a value containing a closing quote followed by a HEEx expression block (e.g.foo" injected={EXPR} bar="), which causes EXPR to be treated as an inline Elixir expression. The resulting template is compiled via EEx.compile_string/2 and executed via Code.eval_quoted_with_env/3 with full Kernel imports and no sandbox, giving the attacker arbitrary code execution on the server. This issue affects phoenix_storybook from 0.5.0 before 1.1.0.
CVSS v4.0
Score 9.5critical
Affected software
pkg:hex/phenixdigital/phoenix_storybookRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability exists in the psb-assign WebSocket event handler within 'Elixir.PhoenixStorybook.Story.PlaygroundPreviewLive':handle_event/3, which accepts arbitrary attribute names and values from unauthenticated clients. These values are stored verbatim by 'Elixir.PhoenixStorybook.Helpers.ExtraAssignsHelpers':handle_set_variation_assign/3. During rendering, 'Elixir.PhoenixStorybook.Rendering.ComponentRenderer':attributes_markup/1 interpolates these values directly into HEEx template strings as name="<val>" without escaping double quotes or HEEx expression delimiters. An attacker can craft a value containing a closing quote followed by a HEEx expression block, causing the expression to be compiled and executed with full privileges via EEx.compile_string/2 and Code.eval_quoted_with_env/3. This results in unauthenticated remote code execution on the server hosting phoenix_storybook versions prior to 1.1.0.
Potential Impact
Successful exploitation allows unauthenticated remote attackers to execute arbitrary code on the server with full Kernel imports and no sandbox restrictions. This can lead to complete compromise of the affected system, including data theft, service disruption, or further network penetration. The CVSS 4.0 base score is 9.5, indicating a critical severity with network attack vector, low attack complexity, no privileges required, no user interaction, and high impacts on confidentiality, integrity, availability, and security requirements.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. No official fix or patch links are provided in the available data. Until a patch is released, avoid exposing the vulnerable phoenix_storybook versions to untrusted networks or unauthenticated users. Monitor vendor communications for updates on remediation. Do not rely on generic mitigations as the vulnerability specifically involves unsanitized HEEx template interpolation.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- EEF
- Date Reserved
- 2026-05-13T11:44:40.790Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a0dc2e7ba1db4736284c258
Added to database: 05/20/2026, 14:19:19 UTC
Last enriched: 05/27/2026, 20:08:17 UTC
Last updated: 07/31/2026, 19:23:00 UTC
Views: 58
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.