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-2024-23525 Overview
CVE-2024-23525 affects the Spreadsheet::ParseXLSX Perl package before version 0.30. The package fails to enable the no_xxe option of XML::Twig when parsing XLSX files. This oversight allows XML External Entity (XXE) attacks against applications that process attacker-supplied spreadsheets. An attacker who convinces a user to open or upload a crafted XLSX file can trigger external entity resolution. The resulting disclosure can expose local files or trigger server-side request forgery through the XML parser. The flaw is classified under CWE-611: Improper Restriction of XML External Entity Reference.
Critical Impact
Attackers can exfiltrate local files from servers that parse untrusted XLSX files using vulnerable versions of Spreadsheet::ParseXLSX.
Affected Products
- Spreadsheet::ParseXLSX Perl module versions before 0.30
- Debian LTS distributions shipping the vulnerable libspreadsheet-parsexlsx-perl package
- Applications and CPAN modules that depend on Spreadsheet::ParseXLSX for XLSX ingestion
Discovery Timeline
- 2024-01-18 - CVE-2024-23525 published to NVD
- 2024-01-18 - Issue disclosed on the Openwall OSS Security list
- 2024-01 - Debian LTS security announcement published
- 2024-02-10 - MetaCPAN security advisory released
- 2026-06-17 - Last updated in NVD database
Technical Details for CVE-2024-23525
Vulnerability Analysis
An XLSX file is a ZIP archive containing multiple XML documents that describe worksheets, styles, and shared strings. Spreadsheet::ParseXLSX extracts these XML parts and hands them to XML::Twig for parsing. XML::Twig provides a no_xxe option that disables resolution of external entities when enabled. Versions of Spreadsheet::ParseXLSX before 0.30 instantiate the parser without this option. The parser therefore resolves SYSTEM and parameter entities declared in the DOCTYPE of any embedded XML document.
An attacker crafts an XLSX file whose internal XML parts include a malicious DOCTYPE. When the vulnerable Perl application parses the file, the XML parser fetches the referenced URI. The content can then be reflected into cell data or exfiltrated through out-of-band channels. See the GitHub issue tracking the fix for maintainer discussion.
Root Cause
The root cause is a missing hardening flag in the XML parser configuration. Spreadsheet::ParseXLSX did not pass no_xxe => 1 to XML::Twig->new(), leaving default external entity processing enabled. This is a classic [CWE-611] misconfiguration where secure parser defaults are not enforced by the downstream consumer.
Attack Vector
Exploitation requires user interaction: a victim application must parse an attacker-supplied XLSX document. The attack is delivered over the network through any workflow that accepts spreadsheet uploads, email attachments, or shared files. Example payloads embed an external entity in xl/workbook.xml or xl/sharedStrings.xml that points to file:///etc/passwd or a controlled HTTP endpoint. A proof-of-concept payload structure is published in a public GitHub gist.
No verified exploit code is included here. Refer to the public gist and the MetaCPAN advisory for payload details.
Detection Methods for CVE-2024-23525
Indicators of Compromise
- XLSX files containing <!DOCTYPE declarations or <!ENTITY references inside xl/workbook.xml, xl/sharedStrings.xml, or related parts
- Outbound DNS or HTTP requests from Perl worker processes to attacker-controlled hosts shortly after file upload
- Unexpected file reads of sensitive paths such as /etc/passwd or /proc/self/environ by processes running perl
Detection Strategies
- Inventory CPAN dependencies and flag any installation of Spreadsheet::ParseXLSX with a version below 0.30
- Inspect uploaded XLSX archives by unzipping and scanning embedded XML for DOCTYPE or external entity declarations before processing
- Enable XML parser logging in applications that embed the module to surface entity resolution attempts
Monitoring Recommendations
- Monitor egress traffic from spreadsheet-processing services for connections to non-approved destinations
- Alert on Perl processes reading sensitive filesystem paths outside their expected working directories
- Track installations of libspreadsheet-parsexlsx-perl across Debian hosts and verify the installed version against the fixed release
How to Mitigate CVE-2024-23525
Immediate Actions Required
- Upgrade Spreadsheet::ParseXLSX to version 0.30 or later from CPAN
- Apply the Debian LTS update for libspreadsheet-parsexlsx-perl on affected systems
- Audit application code paths that ingest XLSX files from untrusted sources and restrict access until patched
Patch Information
The maintainer released Spreadsheet::ParseXLSX version 0.30 on CPAN, which passes no_xxe => 1 to XML::Twig. Release notes are available in the MetaCPAN changes file. Debian LTS users should apply the update described in the Debian LTS announcement.
Workarounds
- Pre-process uploaded XLSX files to strip or reject XML parts containing DOCTYPE or ENTITY declarations
- Run the parsing service in a sandbox with no outbound network access and read-only access limited to the file being processed
- Replace Spreadsheet::ParseXLSX with a maintained alternative that enforces secure XML parsing defaults until the fixed version is deployed
# Upgrade the vulnerable module from CPAN
cpanm Spreadsheet::ParseXLSX@0.30
# Debian/Ubuntu: update the distribution package
sudo apt-get update
sudo apt-get install --only-upgrade libspreadsheet-parsexlsx-perl
# Verify the installed version
perl -MSpreadsheet::ParseXLSX -e 'print $Spreadsheet::ParseXLSX::VERSION, "\n"'
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

