CVEfocus › CVE database › CVE-2026-14895

CVE-2026-14895String::Util versions before 1.36 for Perl are susceptible to a regular expression…

CVSS 7.5 HighEPSS 0.6% (higher than 45% of CVEs)Published 2026-07-07Updated 2026-07-08Assigner: CPANSec

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.

CWE-1333

What to do

Fixed builds are available from Debian: see the table below for the fixed version per release.

Debian, Ubuntu have not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

1Fixed
3Fix pending
2Under investigation
1Will not fix

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.10libstring-util-perlFix pendingUBUNTU-CVE-2026-14895
Ubuntu 26.04libstring-util-perlUnder investigationUBUNTU-CVE-2026-14895
Ubuntu 25.10libstring-util-perlWill not fix
Ubuntu decided not to fix this in this release
UBUNTU-CVE-2026-14895
Ubuntu 24.04libstring-util-perlUnder investigationUBUNTU-CVE-2026-14895
Debian 14libstring-util-perlFixed1.36-1DEBIAN-CVE-2026-14895
Debian 13libstring-util-perlFix pendingDEBIAN-CVE-2026-14895
Debian 12libstring-util-perlFix pendingDEBIAN-CVE-2026-14895

What the vendor says

As published in the CVE record by CPANSec, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

Solution: Upgrade to version 1.36 or later.

Workaround: For deployments that cannot upgrade, enforce a maximum length on strings before passing them to the trim and rtrim functions. Note that the HTML form field maxlength attribute is only enforced client-side.

Vendor advisories:

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.