CVE-2026-7111: Use-after-free in Perl Text::CSV_XS callbacks
- Vendor
- Hmbrand
CVE-2026-7111 is a use-after-free vulnerability in Text::CSV_XS for Perl affecting versions before 1.62. The flaw occurs in the Parse, print, getline, and getline_all methods when they invoke registered callbacks such as after_parse, before_print, or on_error and cache the Perl argument stack pointer across the callback invocation. If a callback extends the Perl argument stack sufficiently to trigger reallocation, the module subsequently writes the return value through a stale pointer into freed memory. As a result, the caller may read the original $self argument as the return value instead of the expected parsed data. In practice, code calling getline_all can receive the Text::CSV_XS object in place of parsed records, leading to logic errors, crashes, and potentially type confusion or broader memory corruption. Instances used without registered callbacks are not affected.
Impact, mitigation & remediation
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
Impact
What an attacker gets, and what they’ve been doing with it.
Successful exploitation can cause stale-pointer writes into freed memory, resulting in use-after-free conditions, type confusion, memory corruption, incorrect return values, application logic failures, and process crashes. In the documented failure mode, callers expecting parsed data from getline_all may instead receive the Text::CSV_XS object, which can break application assumptions and trigger downstream faults.
Mitigation
If you can’t patch tonight, do this now.
If immediate upgrade is not possible, avoid or disable registered callbacks in affected code paths, specifically callbacks such as after_parse, before_print, or on_error used by Parse, print, getline, and getline_all. Text::CSV_XS usage without registered callbacks is not affected, so removing callback usage reduces exposure until the package can be updated.
Remediation
Patch, then assume compromise.
Upgrade Text::CSV_XS to version 1.62 or later. The issue was fixed in the 1.62 release, which includes the patch for unsafe caching of the Perl argument stack pointer across callback execution.
Exploits
No public exploits tracked yet. Mallory keeps watching.
Affected products & vendors
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
References
Frequently asked questions
- Is CVE-2026-7111 exploited in the wild?
- As of Sep 25, 2026, Mallory has no reports of CVE-2026-7111 being exploited in the wild. It is not listed in CISA KEV.
- Is there a public exploit for CVE-2026-7111?
- As of Sep 25, 2026, Mallory has found no public exploit for CVE-2026-7111.
- Is there a patch for CVE-2026-7111?
- Upgrade Text::CSV_XS to version 1.62 or later. The issue was fixed in the 1.62 release, which includes the patch for unsafe caching of the Perl argument stack pointer across callback execution.
- What products are affected by CVE-2026-7111?
- Hmbrand Text::Csv Xs.
- How severe is CVE-2026-7111?
- CVE-2026-7111 has a CVSS v3.1 score of 8.4 (High) and an EPSS score of 0.23% (8th percentile) as of Sep 25, 2026.
Recent activity
6 sources tracked across advisories and community write-ups. News coverage will land here when it surfaces.
No news coverage yet. Advisories and community discussion only.