| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Functions bypassed the object guard in processHeader() and were coerced via template literals without isValidHeaderValue(), allowing CRLF injection when toString/Symbol.toPrimitive returned embedded newlines. Validate after coercion on both scalar and array paths. Signed-off-by: Matteo Collina <hello@matteocollina.com>
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #5579 +/- ##
==========================================
- Coverage 93.47% 93.47% -0.01%
==========================================
Files 110 110
Lines 37564 37575 +11
==========================================
+ Hits 35114 35122 +8
- Misses 2450 2453 +3 ☔ View full report in Codecov by Harness.
|
Sorry, something went wrong.
Functions bypassed the object guard in processHeader() and were coerced via template literals without isValidHeaderValue(), allowing CRLF injection when toString/Symbol.toPrimitive returned embedded newlines. Validate after coercion on both scalar and array paths. Signed-off-by: Matteo Collina <hello@matteocollina.com> (cherry picked from commit 354a151)
Functions bypassed the object guard in processHeader() and were coerced via template literals without isValidHeaderValue(), allowing CRLF injection when toString/Symbol.toPrimitive returned embedded newlines. Validate after coercion on both scalar and array paths. Signed-off-by: Matteo Collina <hello@matteocollina.com> (cherry picked from commit 354a151)
| Back | FazBrowse Home | New Git URL |
Why
processHeader() rejected objects but not functions (typeof fn === 'function'). Non-string values were coerced with `${val}` and written to the HTTP/1.1 wire without isValidHeaderValue(), so a function with a crafted toString() / Symbol.toPrimitive could inject CRLF sequences into request headers.
This is defense-in-depth / hardening, not a security advisory under our threat model: exploitation requires the application to pass a function as a header value (trusted application input). String CRLF was already rejected.
Changes
Test plan