Skip to main content
Vulnerability Database/CVE-2026-110757

CVE-2026-110757: Perl Text::CSV_XS RCE Vulnerability

CVE-2026-110757 is a remote code execution vulnerability in Perl Text::CSV_XS that allows attackers to inject malicious records through unquoted numeric fields. This article covers technical details, affected versions, and mitigation steps.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-110757 Overview

CVE-2026-110757 affects Text::CSV_XS versions before 1.65 for Perl. The module fails to quote fields that Perl has flagged as numeric, even when the underlying string contains embedded whitespace or newlines. An attacker who supplies a value that passes a numeric validation check such as $qty > 0 can inject a newline into a CSV record. The injected newline terminates the record early and converts subsequent fields into a separate row.

The flaw is categorized as [CWE-116] Improper Encoding or Escaping of Output. The patched release is Text::CSV_XS 1.65.

Critical Impact

Attacker-controlled values that pass numeric validation can split a single CSV row into multiple rows, corrupting downstream data pipelines, bypassing allowlists, or injecting forged records into reports and ingestion jobs.

Affected Products

  • Text::CSV_XS for Perl, all versions prior to 1.65
  • Perl applications using combine or print with the default binary option set
  • Downstream tools and pipelines that consume CSV output produced by vulnerable Text::CSV_XS versions

Discovery Timeline

  • 2026-10-16 - CVE-2026-110757 published to the National Vulnerability Database (NVD)
  • 2026-10-20 - Last updated in NVD database

Technical Details for CVE-2026-110757

Vulnerability Analysis

The defect lives in the combine and print routines of Text::CSV_XS. These routines decide whether a field requires quoting by inspecting Perl's internal IOK and NOK flags on the scalar. Perl sets those flags whenever a scalar is used in a numeric context and the string parses as a number. Perl's numeric parser tolerates leading and trailing whitespace, including newlines, which means a string such as "12\n" carries the integer flag after any arithmetic comparison.

With binary enabled, which is the default for the csv convenience function, the module writes the field without quotes. The embedded newline is emitted verbatim, ending the record. Any remaining fields in that call become a second row in the output. Applications that rely on numeric validation gates such as $qty > 0 or $id >= 1 cannot detect the condition because the value is a valid number from Perl's perspective.

Root Cause

The quoting decision depended on scalar flags rather than on the actual bytes of the field. The upstream fix in CSV_XS.xs removes the SvIOK and SvNOK short-circuit and forces the quote check to run against the raw bytes:

text
		 * (always_quote), if binary or blank characters are found
		 * and if the string contains quote or escape characters.
		 */
-		if (!quoteMe &&
-		   ( quoteMe = (!SvIOK (sv) && !SvNOK (sv) && CH_QUOTE))) {
+		if (!quoteMe && (quoteMe = CH_QUOTE)) {
		    char	*ptr2;
		    STRLEN	l;

Source: GitHub Patch Commit fcfb796

Attack Vector

The attacker submits a field value through any input that reaches a vulnerable combine or print call. The value must parse as a number in Perl while also containing a CR, LF, delimiter, or quote character. Typical entry points include web form fields, API parameters, database columns re-exported to CSV, and batch import files. Because the field passes numeric validation, server-side checks do not reject it. The resulting CSV output contains additional, attacker-chosen rows that are consumed by downstream systems such as billing exports, SIEM ingestion pipelines, or data warehouse loaders.

Stop Remote Code Execution Before It Runs

Singularity™ Endpoint detects and blocks exploit attempts at machine speed, including zero-days and novel attack techniques.

Stop Exploit Attempts

Detection Methods for CVE-2026-110757

Indicators of Compromise

  • CSV output files containing fields that match a numeric pattern but include trailing \r or \n bytes before the field delimiter.
  • Unexpected extra rows in CSV exports where column counts do not align with the producing query or form schema.
  • Downstream ingestion errors citing "too few fields" or "unexpected row count" from systems consuming CSV produced by Perl services.

Detection Strategies

  • Inventory Perl applications and CPAN dependencies that pull in Text::CSV_XS and identify installations below version 1.65.
  • Run cpan -D Text::CSV_XS or inspect cpanfile.snapshot and container images to confirm the installed version across build and runtime environments.
  • Add unit tests that pass strings such as "1\n99,admin" through numeric validators and assert that the serialized CSV contains exactly one record.

Monitoring Recommendations

  • Monitor CSV producers and consumers for row-count mismatches between source queries and generated files.
  • Alert on CSV files whose field values contain embedded 0x0A or 0x0D bytes outside of quoted contexts.
  • Review change logs and build pipelines for CPAN upgrades to ensure Text::CSV_XS is pinned at 1.65 or later.

How to Mitigate CVE-2026-110757

Immediate Actions Required

  • Upgrade Text::CSV_XS to version 1.65 or later across all production, staging, and build environments.
  • Audit application code for calls to combine, print, and the csv helper that accept externally supplied values.
  • Reject input fields that contain CR, LF, or the configured CSV separator before passing them to the serializer.

Patch Information

The maintainer released Text::CSV_XS 1.65 containing the fix described in commit fcfb796. The ChangeLog entry reads "combine (): decide quoting from the bytes, not the numeric flags". Refer to the MetaCPAN Release Changes and the GitHub Patch Commit for full details.

Workarounds

  • Set always_quote => 1 when constructing the Text::CSV_XS object so every field is quoted regardless of flag state.
  • Normalize numeric inputs by coercing them through int() or sprintf("%d", $value) before serialization to strip embedded whitespace.
  • Add an explicit regex check such as return unless $value =~ /\A-?\d+(?:\.\d+)?\z/ on any field that is validated as numeric.
bash
# Upgrade Text::CSV_XS to the patched release
cpanm Text::CSV_XS@1.65

# Verify installed version
perl -MText::CSV_XS -e 'print "$Text::CSV_XS::VERSION\n"'

# Enforce quoting at object construction
perl -MText::CSV_XS -e 'my $c = Text::CSV_XS->new({ binary => 1, always_quote => 1 });'

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.