Skip to content

Malicious requests for many overlapping byte ranges of large files risk OOM  #1766

@berthubert

Description

@berthubert

Thank you for cpp-httlib, it is enormously useful for me!
But, here's an issue: a malicious user could craft a Content-Range that causes cpp-httplib to buffer an arbitrary number of copies of a file that it serves. This leads to an easy OOM.

@wandernauta explained the whole issue here very well: berthubert/trifecta#49

Some kind of limit might be appropriate here, but I don't know what it should be.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions