CVE-2023-7101

7.8 HIGH

📋 TL;DR

CVE-2023-7101 is an arbitrary code execution vulnerability in Spreadsheet::ParseExcel Perl module version 0.65. Attackers can execute arbitrary Perl code by crafting malicious Excel files with specially formatted number strings. Any application using this vulnerable module to parse untrusted Excel files is affected.

💻 Affected Systems

Products:
  • Spreadsheet::ParseExcel Perl module
Versions: Version 0.65 specifically
Operating Systems: All operating systems running Perl
Default Config Vulnerable: ⚠️ Yes
Notes: Any Perl application using Spreadsheet::ParseExcel 0.65 to parse Excel files is vulnerable regardless of configuration.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Full system compromise with attacker gaining the same privileges as the application parsing the Excel file, potentially leading to data theft, ransomware deployment, or lateral movement.

🟠

Likely Case

Remote code execution on servers processing user-uploaded Excel files, leading to application compromise and potential data breach.

🟢

If Mitigated

Limited impact if proper input validation and sandboxing are in place, though the eval vulnerability remains dangerous.

🌐 Internet-Facing: HIGH - Web applications accepting Excel file uploads are directly exposed to exploitation.
🏢 Internal Only: MEDIUM - Internal systems processing Excel files from untrusted sources remain vulnerable.

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Proof-of-concept exploit code is publicly available, making exploitation straightforward for attackers.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Version 0.66 or later

Vendor Advisory: https://github.com/jmcnamara/spreadsheet-parseexcel/commit/bd3159277e745468e2c553417b35d5d7dc7405bc

Restart Required: No

Instructions:

1. Update Spreadsheet::ParseExcel using CPAN: 'cpan Spreadsheet::ParseExcel'
2. Or manually install version 0.66+: 'cpanm Spreadsheet::ParseExcel@0.66'
3. Verify installation with 'perl -MSpreadsheet::ParseExcel -e 'print $Spreadsheet::ParseExcel::VERSION'

🔧 Temporary Workarounds

Input validation and sanitization

all

Implement strict validation of Excel file inputs before passing to ParseExcel

Sandbox parsing environment

all

Run Excel parsing in isolated containers or restricted environments

🧯 If You Can't Patch

  • Disable Excel file upload/processing functionality entirely
  • Implement strict file type validation and only allow trusted sources

🔍 How to Verify

Check if Vulnerable:

Check if Spreadsheet::ParseExcel version 0.65 is installed: 'perl -MSpreadsheet::ParseExcel -e 'print $Spreadsheet::ParseExcel::VERSION'

Check Version:

perl -MSpreadsheet::ParseExcel -e 'print $Spreadsheet::ParseExcel::VERSION'

Verify Fix Applied:

Verify version is 0.66 or higher using same command

📡 Detection & Monitoring

Log Indicators:

  • Unusual Perl process execution patterns
  • Excel file parsing errors with eval failures
  • Unexpected system commands from Perl processes

Network Indicators:

  • Outbound connections from Perl processes to unexpected destinations
  • File uploads containing Excel files with unusual patterns

SIEM Query:

process.name:perl AND (process.cmdline:*ParseExcel* OR process.cmdline:*spreadsheet*)

🔗 References

📤 Share & Export