Skip to content

Potential atom exhaustion #4

@abc3

Description

@abc3

Parsing untrusted input with Code.string_to_quoted!/1 can create new atoms for identifiers, literal atoms, and keyword keys.
Since atoms are not garbage-collected in the BEAM, an attacker can send input that generates many unique atoms, eventually exhausting the atom table and crashing the VM.

Solution:
Use existing_atoms_only: true and/or a strict static_atoms_encoder to reject or whitelist allowed atoms.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions