Security context

What an agent needs to avoid regressing past fixes and find the next vuln in this repo.

tokio-rs/axum
main @ ef349f8
6
Fixes
1
CVEs
HIGH
Peak severity
66.7%
Coverage
Highlights
Denial of Service: 2 prior fixes. Scrutinize any change in this area.
axum-extra/src/extract/multipart.rs: most-fixed (1 issue). Treat as high-risk during review.
3 high-severity fixes in this history; regressions here are high-impact.
Recurring patterns

The bug types that recur here, drawn from past fixes, not open vulnerabilities.

Denial of Service: A recursive loop within the `MultipartError::body_text` tracing macro can be triggered during logging at the TRACE level, causing immediate stack overflow and application crash. Developers should ensure variables are fully evaluated and extracted prior to trace-logging.
Response Splitting: The SSE response implementation previously accepted unchecked strings containing carriage returns or newlines, enabling HTTP response injection/splitting. Strict validation must be enforced on event names, IDs, data, and comments to block control characters.
Denial of Service: As detailed in CVE-2022-3212, several default extractors (Bytes, Form, Json, String) did not enforce request body size limits. This allowed remote attackers to trigger out-of-memory crashes by transmitting overly large or infinite payloads.