A query can reference one large list variable from many aliases of the same field. Argument preparation clones the list and rebuilds its literal AST separately for every alias, multiplying CPU work and memory allocation by alias count before the resolver returns.
Request retains the supplied variable map, and distinct aliases survive as separate response keys. The executor invokes coerce_argument_values for each field. The variable branch calls variable_literal, which walks all list elements, then clones the already coerced JSON value and literal. No request work budget or cache bounds this repeated representation conversion.
Enforce a request work budget covering selected fields and variable sizes before execution, and reuse the coerced variable literal instead of rebuilding it per alias. Finding ID: csf_40c0c86b5f9ca66df474190e Primary fingerprint: codex-security/v1:sha256:9f4ce721ccc2da5358ec38e0afea635127e6a2e9330cb52fdfb6c47a9ccc4309 Source revision: c70a100fae8068a9dd3dd5a76608adf2d6d9f2ca
A valid field taking a list variable can be selected repeatedly under unique aliases. The same list is reconstructed and copied for each selected field before resolver dispatch, so a compact request can trigger multiplicative processing.
Inspect the linked paths at commit c70a100fae8068a9dd3dd5a76608adf2d6d9f2ca. This scan did not execute an exploit or test a deployed service.
The source supports a request-size amplification path capable of exhausting process resources. Exploitation needs a schema field accepting a list or input-object variable and an exposed call boundary; the repository examples do not establish a production deployment. Prerequisites: The attacker needs access to a GraphQL call boundary whose schema includes a field accepting a list or input-object argument. Validation limits: No runtime load measurement was performed. Actual memory impact depends on element sizes and application request limits.
List-item amplification. The per-use copy is not limited to aliases. When a field that takes a variable argument is selected below a list field, coerce_argument_values runs once for every returned item. The copy count is then the resolver-returned list length, which the request token limit does not bound. The query needs only a few tokens:
query($v: [String!]!) { items { f(x: $v) } }Measurements. Release build, ExecutionOptions::default(), a trivial dispatcher, and a current-thread Tokio runtime. The GHSA-hq2r-87c2-972j fix was applied, so variable_literal is no longer rebuilt for each use; only the clones of the coerced JSON value and its literal remain.
| Scenario | Request size | CPU time |
|---|---|---|
| 100,000-item string list variable, used once | ~1.2 MB | 11 ms |
| Same variable, 1,000 aliases | ~1.2 MB | 0.90 s |
| Same variable, 1,400 aliases | ~1.2 MB | 1.28 s |
| 10,000 list items, each using a 10,000-item variable | ~120 KB | 0.88 s |
| 10,000 list items, each using the 100,000-item variable | ~1.2 MB | 8.9 s |
Memory also grows when resolvers await. With a resolver that completes immediately, each copy is freed when its field completes, and peak resident memory stayed between 55 and 65 MB. When resolvers yield once before completing, as a resolver awaiting I/O does, sibling fields run concurrently under join_all and every copy stays alive at the same time. With the same ~1.2 MB request, 300 aliases reached 2.9 GB of peak resident memory in 0.59 s, and 1,400 aliases reached 6.8 GB in 3.34 s. The effect is therefore both CPU and memory exhaustion. The request token limit bounds the alias count; it does not bound the list-item path. | ||
Remediation status. The GHSA-hq2r-87c2-972j fix computes each variable literal once per request, removing the repeated variable_literal walk. The per-use deep clone of the coerced JSON value and literal into each field's arguments remains the sink. Caching coerced arguments per field node would let list items share one copy. Sharing variable values behind Arc would also remove the alias multiplier, but it may change the resolver argument type. |
Fuente: NVD
Evaluación gratuita de vulnerabilidades
Evalúa tus prácticas de seguridad en la nube en 9 dominios de seguridad para evaluar tu nivel de riesgo e identificar brechas en tus defensas.
Obtén una demostración personalizada
"La mejor experiencia de usuario que he visto en mi vida, proporciona una visibilidad completa de las cargas de trabajo en la nube."
"Wiz proporciona un panel único para ver lo que ocurre en nuestros entornos en la nube."
"Sabemos que si Wiz identifica algo como crítico, en realidad lo es."