Am I affected?

type your absinthe version to check

Description

Inefficient Algorithmic Complexity vulnerability in absinthe-graphql absinthe allows unauthenticated denial of service via quadratic fragment-name uniqueness validation.

'Elixir.Absinthe.Phase.Document.Validation.UniqueFragmentNames':run/2 iterates over all fragments and for each one calls duplicate?/2, which evaluates Enum.count(fragments, &(&1.name == name)) — a full linear scan of the fragment list. The result is O(N²) comparisons per document, where N is the number of fragment definitions supplied by the caller.

Because input.fragments is built directly from the GraphQL query body, N is fully attacker-controlled. A minimum-size fragment definition is roughly 16 bytes, so a ~1 MB document carries ~60,000 fragments and forces ~3.6 × 10⁹ comparisons inside this single validation phase. No authentication, schema knowledge, or special configuration is required.

This issue affects absinthe: from 1.2.0 before 1.10.2.

Weaknesses & attack patterns

Weakness

CWE-407 · Inefficient Algorithmic Complexity in catalog → MITRE ↗

Attack patterns

CAPEC-229 · Serialized Data Parameter Blowup MITRE ↗

Affected — Hex / absinthe Hex.pm ↗ Repository ↗

1.2.0 < 1.10.2 affected
every other version: unaffected
default status unaffected
cpe cpe:2.3:a:absinthe-graphql:absinthe:*:*:*:*:*:*:*:*
modules · source files · routines
modules 'Elixir.Absinthe.Phase.Document.Validation.UniqueFragmentNames'
source files lib/absinthe/phase/document/validation/unique_fragment_names.ex
routines 'Elixir.Absinthe.Phase.Document.Validation.UniqueFragmentNames':run/2 · 'Elixir.Absinthe.Phase.Document.Validation.UniqueFragmentNames':duplicate?/2

Affected — GitHub / absinthe-graphql/absinthe Repository ↗

0b46e3b < 223600c affected
every other version: unaffected
default status unaffected
cpe cpe:2.3:a:absinthe-graphql:absinthe:*:*:*:*:*:*:*:*
modules · source files · routines
modules 'Elixir.Absinthe.Phase.Document.Validation.UniqueFragmentNames'
source files lib/absinthe/phase/document/validation/unique_fragment_names.ex
routines 'Elixir.Absinthe.Phase.Document.Validation.UniqueFragmentNames':run/2 · 'Elixir.Absinthe.Phase.Document.Validation.UniqueFragmentNames':duplicate?/2

References

Credits

Peter Ullrich Finder
Curtis Schiewek Remediation developer

CVSS breakdown

CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
« All CVEs