{"id":"CVE-2026-14895","published":"2026-07-07T22:12:22Z","modified":"2026-07-08T14:05:18Z","title":"String::Util versions before 1.36 for Perl are susceptible to a regular expression denial of service","vendor":"BAKERSCOT","product":"String::Util","tier":"tail","description":{"text":"String::Util versions before 1.36 for Perl are susceptible to a regular expression denial of service.\n\nThe 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+$.\n\nAny caller that passes untrusted input to trim or rtrim can trigger CPU exhaustion with a string containing a long run of whitespace.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.5,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","provenance":"source","from":"CISA ADP Vulnrichment"},"epss":{"score":0.0063,"percentile":0.51113,"provenance":"source"},"cwes":[{"id":"CWE-1333","name":"Inefficient Regular Expression Complexity"}],"references":[{"url":"https://github.com/scottchiefbaker/String-Util/commit/f8150867aaeb8f57c59601aefb2193f2caed8745.patch","tags":["patch"]},{"url":"https://metacpan.org/release/BAKERSCOT/String-Util-1.36/diff/BAKERSCOT/String-Util-1.35#lib/String/Util.pm","tags":[]},{"url":"https://github.com/scottchiefbaker/String-Util/releases","tags":["release-notes"]},{"url":"http://www.openwall.com/lists/oss-security/2026/07/07/18","tags":[]}],"priority":{"score":15.5,"factors":[{"name":"EPSS percentile","points":10.22},{"name":"CVSS severity","points":5.25}]},"vendorSlug":"bakerscot","affectedVersions":[{"vendor":"BAKERSCOT","product":"String::Util","versions":["< 1.36"]}],"solutions":{"items":["Upgrade to version 1.36 or later."],"from":"CVE.org CNA","provenance":"source"},"workarounds":{"items":["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."],"from":"CVE.org CNA","provenance":"source"},"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"partial","timestamp":"2026-07-08T14:05:12.698100Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2026-42127","exploited":false,"provenance":"source"}}