webcomponents / webcomponents/polyfills

[ShadyCSS] : regular expression may cause exponential backtracking

Open
#425 6 comments 0 reactions 0 assignees View on GitHub
Focus Area: Standards & Polyfills Type: Bug wontfix
Dominant language
HTML
Stars
1.2k
Forks
168
PR merge metrics
No merged PRs in 30d

Description

CodeQL warnings :

`/(:host)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/`

> This part of the regular expression may cause exponential backtracking on strings starting with ':host(' and containing many repetitions of '''.

CWE-400
CWE-730

----------------

`/(?:::slotted)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/`

> This part of the regular expression may cause exponential backtracking on strings starting with '::slotted(' and containing many repetitions of '''.

CWE-400
CWE-730

----------------

_As far as I can tell this issue is not recent, but CodeQL can now detect it._

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.