Excessive CPU and memory use on crafted GraphQL documents
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Fix
- Fixed in 0.17.2
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
Summary
The Rust GraphQL library `juniper` is affected, as its parser, validation rules, and query execution can take excessive CPU time or memory when given a small, specially crafted GraphQL document. Because the requests require no authentication, anyone able to send GraphQL queries to an affected server could cause slowdowns or resource exhaustion.
Summarized by anthropic/claude-haiku-5.5. Verify details against the original sources.
Read the original description
Several parts of `juniper` did work that grew faster than the size of the GraphQL document. A small document could thus use seconds of CPU time or gigabytes of memory. The requests need no authentication. • `OverlappingFieldsCanBeMerged` compared all pairs of fields with the same response name. The rule also reported one error for each pair of conflicting fields. • `NoFragmentCycles` and `OverlappingFieldsCanBeMerged` visited a fragment again for each path that spread the fragment. Validation time thus doubled with each fragment that spread the next fragment twice. • Execution resolved the fields of a fragment once for each spread of the fragment. A document of 1.2 KB could expand into a billion fields. • The parser removed each token from the front of a vector. Parsing time thus grew with the square of the number of tokens. `juniper` 0.17.2 fixes the issues. The parser rejects documents with more than 15,000 tokens and operations with more than 15,000 fields after the expansion of fragments. The validation rules visit each fragment once. `OverlappingFieldsCanBeMerged` stops after 100,000 field comparisons and reports at most 100 conflicts. `RootNode::limit_tokens()` and `RootNode::limit_fields()` change the limits.
Timeline
- Advisory published
- Record last updated
- First seen by cve.now
Affected versions
- junipercrates.io
From 0.0.0-0 · fixed in 0.17.2