Effect: ReDoS in Schema.TemplateLiteral compiled regex
Schema.TemplateLiteral compiles each Schema.String span to the lazy wildcard [\s\S]*? and decodes input by running the resulting regular expression against it. When a template has two or more Schema.String spans, for example: Schema.TemplateLiteral(Schema.String, ":", Schema.String, ":", Schema.String, "X") the regex contains several ambiguous wildcards. A non-matching input makes the backtracking engine try combinations across all of them, so matching time grows cubically with input length. A 5,000-character string of : …