---
id: CVE-2026-7111
title: >-
  Text::CSV_XS versions before 1.62 for Perl have a use-after-free when
  registered callbacks extend the Perl argument stack, which may enable type
  confusion or memory corruption.


  The Parse, print, getline, and getline_all methods invoke r…
summary: >-
  Text::CSV_XS versions before 1.62 for Perl have a use-after-free when
  registered callbacks extend the Perl argument stack, which may enable type
  confusion or memory corruption.


  The Parse, print, getline, and getline_all methods invoke r…
severity: high
cvss: 8.4
cvssVector: 'CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'
cwe:
  - CWE-416
  - CWE-825
published: '2026-04-29'
updated: '2026-06-25'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-7111'
references:
  - url: >-
      https://github.com/cpan-authors/Text-CSV_XS/commit/c17f31a5f2bf36674748eb4b6e25672f0571a224.patch
    label: 9b29abf9-4ab0-4765-b253-1875cd9b441e
  - url: 'https://metacpan.org/release/HMBRAND/Text-CSV_XS-1.62/changes'
    label: 9b29abf9-4ab0-4765-b253-1875cd9b441e
  - url: 'http://www.openwall.com/lists/oss-security/2026/04/29/17'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://lists.debian.org/debian-lts-announce/2026/06/msg00037.html'
    label: af854a3a-2127-422b-91ae-364da2661108
tags:
  - nvd
epss: 0.00158
epssPercentile: 0.0535
ingestedAt: '2026-06-26T16:43:13.631Z'
---

## Overview

Text::CSV_XS versions before 1.62 for Perl have a use-after-free when registered callbacks extend the Perl argument stack, which may enable type confusion or memory corruption.

The Parse, print, getline, and getline_all methods invoke registered callbacks (for example after_parse, before_print, or on_error) and cache the Perl argument stack pointer across the call. If a callback extends the argument stack enough to trigger a reallocation, the return value is written through the stale pointer into the freed buffer, and the caller reads the original $self argument as the return value instead.

Calling code that expects parsed data from getline_all receives the Text::CSV_XS object in its place, leading to logic errors or crashes. Text::CSV_XS objects used without any registered callbacks are not affected.

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.
