# 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

- Database: GitHub
- Severity: CVSS 5.3 (Medium)
- Published: 2026-08-27
- Modified: 2026-08-27

## Affected versions

- guard-core (PyPI): from 3.12.0, fixed in 3.15.0

## Description

### 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.

## References

- https://github.com/Guard-Core/guard-core/security/advisories/GHSA-pw6h-52v8-f33r

Page: https://cve.now/GHSA-PW6H-52V8-F33R

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
