# CVE-2026-14895: String::Util versions before 1.36 for Perl are susceptible to a regular expression denial of service

- Severity: High 7.5 (CVSS:3.1, scored by CISA-ADP) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.39%, higher than 34% of CVEs (2026-12-01)
- Published: 2026-07-07T22:12:22.460Z
- Modified: 2026-10-25T20:10:00.147Z
- Weaknesses: CWE-1333
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial
- 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.

(As written by CVE List.)

## Affected

- String-Util: before 1.36

## References

- <https://github.com/scottchiefbaker/String-Util/commit/f8150867aaeb8f57c59601aefb2193f2caed8745.patch> (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> (release-notes)
- <http://www.openwall.com/lists/oss-security/2026/07/07/18>

## Sources

- CVE List: [CVE-2026-14895](https://www.cve.org/CVERecord?id=CVE-2026-14895), CVE Terms of Use, modified 2026-07-08
- NVD: [CVE-2026-14895](https://nvd.nist.gov/vuln/detail/CVE-2026-14895), Public domain, modified 2026-10-25

---

Page: https://cve.day/CVE-2026-14895 · Whole record: https://cve.day/CVE-2026-14895.json · Rebuilt by cve.day 2026-11-25T22:59:27.329Z
