Skip to main content
Mallory
← Back to News
open-source-dependency-vulnerabilitywidely-deployed-product-advisory

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

Memory Corruption Flaws Disclosed in Perl Text::Minify::XS and Text::CSV_XS

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.
Do you run this?See affected versions and whether adversaries are exploiting it.
Check your exposure
Event timeline

How this story unfolded

Events from the most recent confirmed update back to the earliest known activity.

5 events · Apr 23, 2026 – Apr 29, 2026
  1. Apr 29, 20267mo ago

    Text::CSV_XS 1.62 released to CPAN with fix

    Version 1.62 of Text::CSV_XS was published to CPAN with a fix for CVE-2026-7111. The advisory noted that deployments without registered callbacks were not affected.

  2. Apr 26, 20267mo ago

    CVE-2026-7111 reserved for Text::CSV_XS flaw

    CVE-2026-7111 was reserved for the Text::CSV_XS use-after-free vulnerability. The issue can lead to type confusion, memory corruption, logic errors, or crashes when registered callbacks trigger Perl stack reallocation.

  3. Apr 25, 20267mo ago

    Fixed Text::Minify::XS release uploaded to CPAN

    A corrected Text::Minify::XS release, version 0.7.8, was uploaded to CPAN to fix CVE-2026-7040. Users were advised to upgrade or validate strings passed to the affected functions as a workaround.

  4. Apr 25, 20267mo ago

    Patch committed for Text::CSV_XS use-after-free

    A public patch was committed for CVE-2026-7111 in Text::CSV_XS, addressing a use-after-free caused by callbacks that extend the Perl argument stack. The bug affected methods including parse, print, getline, and getline_all in versions before 1.62.

  5. Apr 23, 20267mo ago

    CPANSec identifies heap overflow in Text::Minify::XS

    The CPAN Security Group identified CVE-2026-7040 in Text::Minify::XS, affecting versions from 0.3.0 before 0.7.8. The flaw is a heap overflow triggered by malformed UTF-8 input in the minify and minify_utf8 functions.

Linked entities

Related entities

Vulnerabilities, threat actors, malware, products, organizations, and breaches Mallory has linked to this story.

Open in app →
Do you run this?See whether adversaries are exploiting this yet, and where the affected versions run in your environment.
Check Your Exposure
Mallory platform

See the full picture, correlated to your attack surface.

This page covers what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which threat actors are using it right now, and what to deploy next.

Exposure mappingMap indicators from this story to your assets and identify affected systems in minutes.
Threat actor evidenceEvery observed campaign, victim, and pivot linked to actors named in this story.
Associated malwareMalware, exploits, and IOCs connected to the activity described here.
Detection signaturesYARA, Sigma, and Snort rules deployed to your SIEM as soon as they’re published.
Scheduled alertsGet matching new stories delivered to your team as they break, not the next morning.
AI threadsAsk questions about this story and take action on the answers.