Possible ReDoS from rawRecipe.pathRegex
Categories
(Toolkit :: Password Manager, defect)
Tracking
()
People
(Reporter: uncleruc2075, Unassigned)
Details
Attachments
(1 file)
592 bytes,
text/plain
|
Details |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36
Steps to reproduce:
In file toolkit/components/passwordmgr/LoginRecipes.sys.mjs
section where rawRecipe.pathRegex is processed and used to create a new RegExp object without any validation.
Input a regular expression pattern with catastrophic backtracking behavior (a+)+).
Actual results:
The program dynamically creates a RegExp object from an unsanitized input, which may lead to excessive computational complexity if the regular expression contains patterns prone to ReDoS (e.g., nested quantifiers).
If a malicious user or external source provides a specially crafted regular expression, the application can experience a significant delay or crash, resulting in a denial of service (DoS) condition.
Expected results:
The code should validate the regular expression pattern before using it to ensure it does not contain unsafe or complex patterns prone to ReDoS attacks.
The code does not properly sanitize or validate regular expression patterns before creating a RegExp object.
Updated•19 days ago
|
Comment 1•19 days ago
|
||
It looks like the values of rawRecipe.pathRegex are hard coded, so there shouldn't be a problem in practice.
Comment hidden (obsolete) |
Updated•19 days ago
|
Updated•18 days ago
|
Updated•14 days ago
|
Description
•