{"id":"CVE-2026-14895","state":"PUBLISHED","title":"String::Util versions before 1.36 for Perl are susceptible to a regular expression denial of service","description":"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.","publishedAt":"2026-07-07T22:12:22.460Z","updatedAt":"2026-07-08T14:05:18.813Z","severity":{"score":7.5,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","source":"CISA-ADP"},"assigner":"CPANSec","products":["BAKERSCOT String::Util"],"affected":[{"vendor":"BAKERSCOT","product":"String::Util","packageName":"String-Util","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThan":"1.36","versionType":"custom"}],"collectionURL":"https://cpan.org/modules","programFiles":["lib/String/Util.pm"],"programRoutines":[{"name":"String::Util::trim"},{"name":"String::Util::rtrim"}],"repo":"https://github.com/scottchiefbaker/String-Util"}],"references":["https://github.com/scottchiefbaker/String-Util/commit/f8150867aaeb8f57c59601aefb2193f2caed8745.patch","https://metacpan.org/release/BAKERSCOT/String-Util-1.36/diff/BAKERSCOT/String-Util-1.35#lib/String/Util.pm","https://github.com/scottchiefbaker/String-Util/releases","http://www.openwall.com/lists/oss-security/2026/07/07/18"],"weaknesses":["CWE-1333"],"ingestedAt":"2026-10-29T20:11:00.674Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/14xxx/CVE-2026-14895.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-14895","state":"PUBLISHED","datePublished":"2026-07-07T22:12:22.460Z","dateUpdated":"2026-07-08T14:05:18.813Z","assignerShortName":"CPANSec","assignerOrgId":"9b29abf9-4ab0-4765-b253-1875cd9b441e","dateReserved":"2026-07-06T18:31:10.251Z"},"containers":{"cna":{"title":"String::Util versions before 1.36 for Perl are susceptible to a regular expression denial of service","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"BAKERSCOT","product":"String::Util","packageName":"String-Util","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThan":"1.36","versionType":"custom"}],"collectionURL":"https://cpan.org/modules","programFiles":["lib/String/Util.pm"],"programRoutines":[{"name":"String::Util::trim"},{"name":"String::Util::rtrim"}],"repo":"https://github.com/scottchiefbaker/String-Util"}],"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"},{"url":"https://github.com/scottchiefbaker/String-Util/releases","tags":["release-notes"]}],"problemTypes":[{"descriptions":[{"cweId":"CWE-1333","description":"CWE-1333 Inefficient Regular Expression Complexity","lang":"en","type":"CWE"}]}],"providerMetadata":{"shortName":"CPANSec","orgId":"9b29abf9-4ab0-4765-b253-1875cd9b441e","dateUpdated":"2026-07-07T22:12:22.460Z"},"solutions":[{"lang":"en","value":"Upgrade to version 1.36 or later."}],"source":{"discovery":"UNKNOWN"},"workarounds":[{"lang":"en","value":"For deployments that cannot upgrade, enforce a maximum length on strings before passing them to the trim and rtrim functions.\n\nNote that the HTML form field maxlength attribute is only enforced client-side."}],"x_generator":{"engine":"cpansec-cna-tool 0.1"}},"adp":[{"title":"CVE Program Container","references":[{"url":"http://www.openwall.com/lists/oss-security/2026/07/07/18"}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2026-07-08T00:28:33.750Z"}},{"title":"CISA ADP Vulnrichment","metrics":[{"cvssV3_1":{"scope":"UNCHANGED","version":"3.1","baseScore":7.5,"attackVector":"NETWORK","baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","integrityImpact":"NONE","userInteraction":"NONE","attackComplexity":"LOW","availabilityImpact":"HIGH","privilegesRequired":"NONE","confidentialityImpact":"NONE"}},{"other":{"type":"ssvc","content":{"timestamp":"2026-07-08T14:05:12.698100Z","id":"CVE-2026-14895","options":[{"Exploitation":"none"},{"Automatable":"yes"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-07-08T14:05:18.813Z"}}]}}}