Unauthenticated denial-of-service via BEAM atom table exhaustion in phoenix_storybook
Allocation of Resources Without Limits or Throttling vulnerability in phenixdigital phoenix_storybook allows unauthenticated denial of service via atom table exhaustion. LiveView event handlers and request parameters of the storybook convert client-supplied strings to atoms. Atoms are never garbage-collected, so a client that sends enough unique strings fills the atom table, and the BEAM node terminates. PhoenixStorybook.ExtraAssignsHelpers.handle_set_variation_assign/3 and handle_toggle_variation_assign/3 call String.to_atom/1 on parameter keys, attribute names, variation ids, and values of attributes declared as :atom or :boolean. PhoenixStorybook.Story.Playground.handle_event/3 and PhoenixStorybook.StoryLive do the same for tab names, theme names, and playground field names. Releases published as phx_live_storybook have the same calls in the PhxLiveStorybook namespace, at first in PhxLiveStorybook.EntryLive. This issue affects phoenix_storybook: from 0.5.0 before 1.1.0; phx_live_storybook: from 0.2.0 onward.