/

CVE-2026-110757

Severity:

CRITICAL RISK

(9.8)

CSV Record Splitting (CWE-116) in Text::CSV_XS Perl

CVE-2026-110757

Awaiting Analysis

Vulnerability type

Category:

Improper Output Encoding or Escaping

CWE:

CWE-116

Impact:

CSV Record Splitting and Data Integrity Compromise

Severity:

CRITICAL RISK

(9.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Text::CSV_XS can write numeric-looking fields without required CSV quoting when Perl has marked the value as numeric. If such a value contains leading or trailing whitespace and a record delimiter, an attacker may cause one logical record to be split into multiple CSV rows.

Text::CSV_XS can write numeric-looking fields without required CSV quoting when Perl has marked the value as numeric. If such a value contains leading or trailing whitespace and a record delimiter, an attacker may cause one logical record to be split into multiple CSV rows.

Affected context

The issue may occur in Perl applications that use Text::CSV_XS to combine or print records, particularly when:

  • CSV output is generated with binary mode enabled
  • Field values have been involved in numeric operations or validation
  • A value that parses as a number also contains whitespace or record-separator characters
  • Downstream systems trust generated CSV row boundaries

The issue may occur in Perl applications that use Text::CSV_XS to combine or print records, particularly when:

  • CSV output is generated with binary mode enabled
  • Field values have been involved in numeric operations or validation
  • A value that parses as a number also contains whitespace or record-separator characters
  • Downstream systems trust generated CSV row boundaries

Exploit preconditions

  • Attack surface: CSV generation through Text::CSV_XS combine or print
  • Required access: Ability to influence a field value that reaches CSV output
  • Trigger point: Serialization of a value carrying Perl's integer or numeric flag
  • Why exploitation is possible: The serializer may omit quoting based on the numeric flag without rechecking whether the complete string requires escaping, allowing an embedded record delimiter to terminate the row
  • Attack surface: CSV generation through Text::CSV_XS combine or print
  • Required access: Ability to influence a field value that reaches CSV output
  • Trigger point: Serialization of a value carrying Perl's integer or numeric flag
  • Why exploitation is possible: The serializer may omit quoting based on the numeric flag without rechecking whether the complete string requires escaping, allowing an embedded record delimiter to terminate the row

Why this happens

The underlying bug is an output-encoding failure. Text::CSV_XS relies on Perl's numeric or integer flag when deciding whether a field requires quoting, but that flag does not guarantee that the complete string is safe to emit unquoted. A value can be accepted as numeric while still containing whitespace and a record delimiter. This behavior maps to CWE-116, where output is not properly encoded or escaped for the format in which it is written.

The underlying bug is an output-encoding failure. Text::CSV_XS relies on Perl's numeric or integer flag when deciding whether a field requires quoting, but that flag does not guarantee that the complete string is safe to emit unquoted. A value can be accepted as numeric while still containing whitespace and a record delimiter. This behavior maps to CWE-116, where output is not properly encoded or escaped for the format in which it is written.

Potential impact

  • Generated CSV data may contain unintended additional records
  • Imported quantities or other fields could be associated with the wrong rows
  • Validation and reconciliation workflows may process altered record boundaries
  • Downstream applications could experience data integrity issues or parser inconsistencies
  • Audit, reporting, or data-transfer outputs may be manipulated
  • Generated CSV data may contain unintended additional records
  • Imported quantities or other fields could be associated with the wrong rows
  • Validation and reconciliation workflows may process altered record boundaries
  • Downstream applications could experience data integrity issues or parser inconsistencies
  • Audit, reporting, or data-transfer outputs may be manipulated

General mitigation guidance

Mitigation generally focuses on ensuring that every emitted field is validated and escaped according to the target CSV format, regardless of language-level type flags.

Common defensive patterns include:

  • Use a CSV serializer that always performs complete delimiter, quote, and newline checks
  • Treat externally influenced values as strings during output encoding
  • Apply format-aware validation after all transformations and before serialization
  • Reject or normalize unexpected control characters where business requirements permit
  • Preserve least-privilege access for processes that generate or consume exported data
  • Add downstream import safeguards that validate row structure and expected column counts

Mitigation generally focuses on ensuring that every emitted field is validated and escaped according to the target CSV format, regardless of language-level type flags.

Common defensive patterns include:

  • Use a CSV serializer that always performs complete delimiter, quote, and newline checks
  • Treat externally influenced values as strings during output encoding
  • Apply format-aware validation after all transformations and before serialization
  • Reject or normalize unexpected control characters where business requirements permit
  • Preserve least-privilege access for processes that generate or consume exported data
  • Add downstream import safeguards that validate row structure and expected column counts

How teams detect issues like this

Organizations can look for this class of issue through:

  • Static analysis and dependency review for CSV libraries with conditional quoting logic
  • Code review checks for numeric validation followed by format serialization
  • Tests containing whitespace, delimiters, quotes, and newline characters in numeric-looking fields
  • Differential tests comparing serialized output with a strict CSV parser
  • Policy enforcement requiring format-aware encoders for exported data

Automated dependency and code-review tools may help identify affected library usage and unsafe serialization patterns.

Organizations can look for this class of issue through:

  • Static analysis and dependency review for CSV libraries with conditional quoting logic
  • Code review checks for numeric validation followed by format serialization
  • Tests containing whitespace, delimiters, quotes, and newline characters in numeric-looking fields
  • Differential tests comparing serialized output with a strict CSV parser
  • Policy enforcement requiring format-aware encoders for exported data

Automated dependency and code-review tools may help identify affected library usage and unsafe serialization patterns.

Sources

SourceLink
github.comgithub.com/cpan-authors/Text-CSV_XS/commit/fcfb796cb50de9cef8b94a70535304ac41a50c56.patch
metacpan.orgmetacpan.org/release/HMBRAND/Text-CSV_XS-1.65/changes

Frequently asked

questions

It depends on the application architecture. The issue can affect a remotely accessible service when untrusted users can influence values that the service exports as CSV.

No. In an exposed application, control over an exported field may be sufficient; direct host access is not generally required.

Ensure every field is encoded according to CSV rules after validation and transformation, without trusting Perl's numeric or integer flags to determine quoting.

Use maintained, format-aware serializers, test special-character and newline cases, review numeric-to-text conversion paths, and validate generated output with a strict parser.

It depends on the application architecture. The issue can affect a remotely accessible service when untrusted users can influence values that the service exports as CSV.

No. In an exposed application, control over an exported field may be sufficient; direct host access is not generally required.

Ensure every field is encoded according to CSV rules after validation and transformation, without trusting Perl's numeric or integer flags to determine quoting.

Use maintained, format-aware serializers, test special-character and newline cases, review numeric-to-text conversion paths, and validate generated output with a strict parser.

Find out what's already
exploitable in your codebase.