Memory Corruption Flaws Disclosed in Perl Text::Minify::XS and Text::CSV_XS
Vulnerability Disclosure · 3 sources · Updated 5mo ago · First seen Apr 27, 2026

The CPAN Security Group disclosed two memory-safety vulnerabilities affecting widely used Perl modules. CVE-2026-7040 impacts Text::Minify::XS from v0.3.0 before v0.7.8, where malformed UTF-8 input can trigger a heap overflow in the minify and minify_utf8 functions, leading to heap corruption through improper Unicode handling. Maintainers advised users to upgrade to v0.7.8 or later, and said deployments that cannot patch immediately should validate strings before passing them to the affected routines.
A separate advisory, CVE-2026-7111, affects Text::CSV_XS before 1.62 and stems from a use-after-free when registered callbacks extend the Perl argument stack. The bug arises because methods including Parse, print, getline, and getline_all may retain a stale stack pointer across callback execution, creating a path to type confusion, memory corruption, crashes, or logic errors. The issue does not affect Text::CSV_XS instances that do not use registered callbacks, and the fix was released in version 1.62 after a public patch and CPAN publication.
Why it matters
Impact assessment
These flaws affect Perl applications and services that depend on the CPAN modules Text::Minify::XS and Text::CSV_XS, especially developer tooling, web applications, data-processing pipelines, and backend services that parse CSV or minify text. The immediate impact is application instability, crashes, logic errors, and potential memory corruption; in unsafe execution paths, memory-safety flaws can also create a path toward code execution, though the provided references do not confirm code execution or active exploitation.
Severity and scope
- Affected products:
- Text::Minify::XS versions v0.3.0 before v0.7.8
- Text::CSV_XS versions before 1.62
- Affected users:
- Organizations running Perl workloads with these modules installed directly or transitively
- Developers and CI/CD environments that process untrusted text or CSV input
- Business impact:
- Service crashes and operational disruption from heap corruption or use-after-free conditions
- Data-processing errors and silent logic faults, particularly in CSV parsing workflows
- Potential reputational impact if exposed services mishandle attacker-controlled input
- Scope of exposure:
- Potentially broad across Perl ecosystems using these common CPAN packages
- Text::CSV_XS exposure is narrower in practice because exploitation requires registered callbacks and affected methods
- Exploitation status:
- No confirmed in-the-wild exploitation is stated in the references
Extracted facts
- CVE-2026-7040 affects Text::Minify::XS.
- CVE-2026-7111 affects Text::CSV_XS.
- The CPAN Security Group disclosed both issues.
- Text::CSV_XS can return the original $self object instead of parsed data in affected flows, causing logic errors or crashes.
- Text::CSV_XS instances without registered callbacks are not affected by CVE-2026-7111.


