String::Util versions before 1.36 for Perl are susceptible to a regular expression denial of service
Summary
| CVE | CVE-2026-14895 |
|---|---|
| State | PUBLISHED |
| Assigner | CPANSec |
| Source Priority | CVE Program / NVD first with legacy fallback |
| Published | 2026-07-07 23:16:54 UTC |
| Updated | 2026-07-08 15:56:29 UTC |
| 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. |
Risk And Classification
Primary CVSS: v3.1 7.5 HIGH from ADP
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Problem Types: CWE-1333 | CWE-1333 CWE-1333 Inefficient Regular Expression Complexity
| Version | Source | Type | Score | Severity | Vector |
|---|---|---|---|---|---|
| 3.1 | ADP | DECLARED | 7.5 | HIGH | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| 3.1 | 134c704f-9b21-4f2e-91b3-4a467353bcc0 | Secondary | 7.5 | HIGH | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
CVSS v3.1 Breakdown
Attack Vector
NetworkAttack Complexity
LowPrivileges Required
NoneUser Interaction
NoneScope
UnchangedConfidentiality
NoneIntegrity
NoneAvailability
HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Vendor Declared Affected Products
| Source | Vendor | Product | Version | Platforms |
|---|---|---|---|---|
| CNA | BAKERSCOT | StringUtil | affected 1.36 custom | Not specified |
References
| Reference | Source | Link | Tags |
|---|---|---|---|
| metacpan.org/release/BAKERSCOT/String-Util-1.36/diff/BAKERSCOT/String-Util... | 9b29abf9-4ab0-4765-b253-1875cd9b441e | metacpan.org | |
| github.com/scottchiefbaker/String-Util/commit/f8150867aaeb8f57c59601aefb... | 9b29abf9-4ab0-4765-b253-1875cd9b441e | github.com | |
| www.openwall.com/lists/oss-security/2026/07/07/18 | af854a3a-2127-422b-91ae-364da2661108 | www.openwall.com | |
| github.com/scottchiefbaker/String-Util/releases | 9b29abf9-4ab0-4765-b253-1875cd9b441e | github.com | |
| CVE Program record | CVE.ORG | www.cve.org | canonical |
| NVD vulnerability detail | NVD | nvd.nist.gov | canonical, analysis |
No vendor comments have been submitted for this CVE.
Additional Advisory Data
Solutions
CNA: Upgrade to version 1.36 or later.
Workarounds
CNA: 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.
There are currently no legacy QID mappings associated with this CVE.