GHSA-PW6H-52V8-F33R
A request body larger than detection_max_body_inspect_bytes was skipped by body detection entirely instead of being scanned up to the cap
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-PW6H-52V8-F33R divulgada · CVSS 5.3 (GitHub) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
When a request declared a `Content-Length` above `detection_max_body_inspect_bytes` (default 262144), `guard_core/_utils/body_reader.py` returned no body to the scanner at all, so body detection ran on nothing. A payload placed at the start of a body padded past 256 KB was never scanned, while the same payload in a 255 KB body was detected. Found by the maintainers while profiling the fix for GHSA-3hfx-8m47-5f9h.
Impact
Body-borne detection (every category that scans the request body: SQL injection, command injection, deserialization, and the rest) is bypassed by padding the body past the inspection cap. The cap exists to bound memory; it was implemented as a skip instead of a truncation. Unauthenticated, default configuration, any adapter.
Affected
guard-core versions with `detection_max_body_inspect_bytes` (the cap was introduced with the chunked-body fix in 3.12.0; earlier versions had other body-size behaviour) up to and including 3.14.0.
Fixed in 3.15.0
Fixed in guard-core 3.15.0 https://github.com/rennf93/guard-core/releases/tag/3.15.0 (PyPI https://pypi.org/project/guard-core/3.15.0/), merged in #83 https://github.com/rennf93/guard-core/pull/83 (75d13343). An oversized body is read up to the cap through the adapter's bounded reader (`read_body_prefix`, present in fastapi-guard since 7.6.0 and the other adapters since their 3.12.0 lockstep), the straddle overlap the no-Content-Length path already used is applied, and the prefix is scanned; one warning per request names the cap and the client. An adapter without a bounded reader still skips, now with a warning that names the missing reader. The detection-gate corpus pins the attack-in-the-first-kilobyte and the benign 300 KB cases.
Credit
Found by the maintainers.
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.15.0 | — | — |
3.15.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-pw6h-52v8-f33rLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
