{"id":"UBUNTU-CVE-2026-14895","details":"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.","modified":"2026-07-09T21:30:15.396916119Z","published":"2026-07-07T23:16:00Z","upstream":["CVE-2026-14895"],"references":[{"type":"REPORT","url":"https://ubuntu.com/security/CVE-2026-14895"},{"type":"REPORT","url":"https://www.cve.org/CVERecord?id=CVE-2026-14895"},{"type":"REPORT","url":"https://lists.security.metacpan.org/cve-announce/msg/41625636/"}],"affected":[{"package":{"name":"libstring-util-perl","ecosystem":"Ubuntu:24.04:LTS","purl":"pkg:deb/ubuntu/libstring-util-perl?arch=source&distro=noble"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.34-2"],"ecosystem_specific":{"binaries":[{"binary_name":"libstring-util-perl","binary_version":"1.34-2"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-14895.json"}},{"package":{"name":"libstring-util-perl","ecosystem":"Ubuntu:25.10","purl":"pkg:deb/ubuntu/libstring-util-perl?arch=source&distro=questing"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.35-1"],"ecosystem_specific":{"binaries":[{"binary_name":"libstring-util-perl","binary_version":"1.35-1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-14895.json"}},{"package":{"name":"libstring-util-perl","ecosystem":"Ubuntu:26.04:LTS","purl":"pkg:deb/ubuntu/libstring-util-perl?arch=source&distro=resolute"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.35-1"],"ecosystem_specific":{"binaries":[{"binary_name":"libstring-util-perl","binary_version":"1.35-1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-14895.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"},{"type":"Ubuntu","score":"medium"}]}