GHSA-5CXC-H6C3-R39G
Request parameter names are not scanned, bypassing detection for all categories
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-5CXC-H6C3-R39G divulgada · CVSS 5.3 (GitHub) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
guard-core's request scanner inspects the VALUES of query parameters, form fields, and JSON body fields, but never the parameter NAMES (keys). A parameter name is used only for exclusion-list matching and logging; it is never passed to the detection engine. As a result, any attack payload delivered in a parameter name, rather than in its value, is not inspected by any detection pattern, in any category, in any released version. This is a failure of guard-core's detection protection mechanism (CWE-693), not a compromise of guard-core itself or of the host application.
Impact
`_scan_query_params` in `guard_core/utils.py` iterates `request.query_params.items()` and passes only the `value` of each parameter to `_check_request_component`; the `key` (parameter name) is used solely for exclusion-list matching and log labelling, never fed to the detection engine. The equivalent body/form scanning shares this shape. No detection pattern is ever evaluated against a parameter name.
Consequently, a payload of ANY detection category (SQL injection, XSS, command injection, NoSQL injection, prototype pollution, and so on) placed in a parameter NAME bypasses detection end-to-end. First-party demonstration:
- `{"1;DROP TABLE x": "1"}` (a stacked-query SQLi payload delivered as the parameter name) is NOT detected.
- `{"q": "1;DROP TABLE x"}` (the identical string delivered as a parameter value) IS detected.
The highest-impact concrete cases are NoSQL operator injection and prototype pollution, because their standard real-world delivery (the Express / `qs` / `api-query-params` query-string convention) places the payload IN the parameter name:
- `?username[$ne]=admin` (NoSQL authentication bypass; the `[$ne]` operator lives in the parameter name)
- `?__proto__[isAdmin]=true`, `?constructor[prototype][isAdmin]=true` (prototype pollution)
For these categories the parameter-name channel is not an edge case but the canonical attack vector, so the detection a consumer expects guard-core to provide for them is bypassed under normal exploitation.
This is a gap in guard-core's DETECTION LAYER. It does not, by itself, compromise guard-core or the protected application. Real-world impact requires an independently vulnerable downstream component (an application itself susceptible to the injected payload, for example a MongoDB query that trusts a user-controlled operator, or a Node.js recursive merge vulnerable to prototype pollution). What fails is the detection and blocking that a consumer would reasonably expect guard-core to provide for parameter-name-delivered payloads.
CWE-693: Protection Mechanism Failure.
Affected versions
All released versions of guard-core (`< 3.13.0`).
[PLACEHOLDER: the patched version is pending the parameter-name-scan pipeline fix gating green and maintainer sign-off; confirm `3.13.0` or adjust at release.]
Framework adapters (fastapi-guard, flaskapi-guard, djapi-guard) inherit this behavior through their guard-core dependency and are remediated by upgrading guard-core. This advisory is filed against guard-core as the single affected package rather than duplicated per adapter.
Patches
[PLACEHOLDER pending the fix] guard-core `3.13.0` extends the request scanner to also inspect parameter names (query-string keys, and form / JSON body keys), so a payload delivered in a parameter name is evaluated by the detection engine on the same footing as a value. Because feeding parameter names to the engine is a new detection surface, the fix is accompanied by a full-category false-positive measurement and any required disclosures (for example the NoSQL operator-query-API convention `?price[$gt]=100`, which is character-identical to `[$ne]`/`[$gt]` injection). The precise scanning approach and its disclosed false-positive surface will be finalized here once the pipeline fix is signed off.
Mitigations / workarounds
For affected versions (`< 3.13.0`) there is NO configuration remedy: parameter-name scanning is not exposed as an option. Recommended actions:
- Upgrade to guard-core `3.13.0` or later once available.
- As defense in depth for parameter-name-delivered payloads (and after upgrading, for downstream robustness): validate or allowlist expected query-parameter names at the application layer, reject unexpected NoSQL query operators, and use a prototype-pollution-safe merge/assignment. Keep downstream components patched.
References
- `guard_core/utils.py`: `_scan_query_params` (and the equivalent body / form scanning), which passes only parameter values to `_check_request_component`.
Severity
Moderate. `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N` (5.3). Same conservative basis as the header-exclusion advisory (GHSA-vg6x-82jh-rp4h): network-reachable, no privileges or interaction; guard-core's own confidentiality and availability are unaffected (C:N/A:N); the integrity impact is limited to the bypassed detection layer (I:L); scope is unchanged (S:U) because actual harm is gated on an independently vulnerable downstream component.
OPEN SEVERITY QUESTION (pending maintainer decision): 5.3 as above, versus 6.1 if the NoSQL-authentication-bypass data-access angle is weighted as a confidentiality impact, i.e. `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N` (6.1). This draft is persisted at 5.3 for consistency with the header advisory (GHSA-vg6x-82jh-rp4h), because the confidentiality harm, like the integrity harm, is gated on a downstream vulnerability rather than on guard-core itself. The maintainer may bump to 6.1 at review.
Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.
Desglose de métricas
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
PyPIguard-core |
Corregida | 3.13.0 | — | — |
3.13.0Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/Guard-Core/guard-core/security/advisories/GHSA-5cxc-h6c3-r39gLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
