Content-Length header not validated — negative value causes rfile.read() to hang #2
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
security
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: SheWhoReignsSupreme/forge-paste#2
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
do_POSTreadsContent-Lengthas a plainint()without checking for negative values. A malicious client sendingContent-Length: -1will causeself.rfile.read(-1)which reads until EOF, potentially blocking the request handler thread indefinitely.Location
forge-paste.py, line 279:Fix