Skip to content

Possible ReDoS #6

Open
Open
@elcreator

Description

@elcreator

https://github.com/phalcon/bridge-swoole/blob/master/src/Request.php#L180
should be like

#(\\w+)=(["\'])?([^"\', ]+)(\\2)?#

to mitigate so called "catastrophic backtracking" https://owasp.org/www-community/attacks/Regular_expression_Denial_of_Service_-_ReDoS when provided input like "a=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
(or optionally even stricter if it's possible to replace "+" with reasonable max length)

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions