CVE-2026-14895: Perl Redos Trim

Trimming whitespace with `\s*` combined with anchors (`^` or `$`) can lead to catastrophic backtracking (ReDoS) when processing strings with large blocks of whitespace. Use `\s+` instead of `\s*` to prevent quadratic evaluation time.

Provally CuratedPublic repositoryMediumMedium confidenceVerifiedApache-2.0Generic
greprules fetch cve-2026-14895-perl-redos-trim --engine opengrep

Description

Trimming whitespace with `\s*` combined with anchors (`^` or `$`) can lead to catastrophic backtracking (ReDoS) when processing strings with large blocks of whitespace. Use `\s+` instead of `\s*` to prevent quadratic evaluation time.