CVE-2026-145760: Text::Minify::XS versions before 0.7.10 for Perl terminate the process when minify is called with a number or a reference
Text::Minify::XS versions before 0.7.10 for Perl terminate the process when minify is called with a number or a reference.
Text::Minify::XS removes indentation and trailing whitespace from multi-line text.
minify and minifyascii read the argument's string buffer directly, without converting a number or reference first. For such an argument the pointer and length are meaningless, and the call exits with an "Out of memory" error, or crashes, which eval cannot catch. minifyutf8 is an alias for minify.
An attacker who can send a number or a JSON boolean where an application expects a string, for example in a JSON request body passed to minify, can terminate the process.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
Text::Minify::XSto a version that resolves this vulnerability.Fixed in 0.7.10
Event History
Frequently Asked Questions
Who is realistically exposed to this issue?
Applications using affected Text::Minify::XS versions are exposed when untrusted input can reach minify, minify_ascii, or minify_utf8 without being ensured to be a string. A JSON request path is an example when a client can supply a number or JSON boolean where the application expects text.
What does an attacker need to provide to trigger the failure?
The attacker needs to cause one of the affected functions to be called with a number or reference rather than a string. JSON numeric and boolean values are specifically identified as inputs that can produce this condition.
Can application error handling catch the failure?
No. The process can exit with an "Out of memory" error or crash, and the described failure cannot be caught with eval.
Are all of the module's minification entry points affected?
minify and minify_ascii are affected because they read the argument's string buffer directly. minify_utf8 is also affected because it is an alias for minify.