Skip to content
OpenAdvisories
High · 7.5 CVE-2026-14895 EUVD-2026-42127GHSA-vm32-9cff-wgh2

String::Util versions before 1.36 for Perl are susceptible to a regular expression denial of service

Published Jul 7, 2026 · Updated Jul 8, 2026 · Assigned by CPANSec

Description

String::Util versions before 1.36 for Perl are susceptible to a regular expression denial of service.

The trim and rtrim functions stripped trailing whitespace with s/\s*$//u. Because \s* matches greedily and the $ anchor fails whenever a non-whitespace character follows the whitespace, the regex engine retries the match at each offset of a long whitespace run, producing quadratic backtracking. The fix replaces \s*$ with \s+$.

Any caller that passes untrusted input to trim or rtrim can trigger CPU exhaustion with a string containing a long run of whitespace.

Affected products

VendorProductAffectedFixed
BAKERSCOT String::Util < 1.36 1.36

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 libstring-util-perl 1.36-1 —
Debian 13 libstring-util-perl No fix yet —
Debian 12 libstring-util-perl No fix yet —
ReleasePackageFixed inAdvisory
Ubuntu 26.10 libstring-util-perl No fix yet —
Ubuntu 26.04 LTS libstring-util-perl No fix yet —
Ubuntu 25.10 libstring-util-perl No fix yet —
Ubuntu 24.04 LTS libstring-util-perl No fix yet —

References