Cloudanix VulnDB

CVE-2017-5992

High · 8.2

CVSS

8.2

EPSS

1.2%

Published

Feb 15, 2017

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

A tool that reads spreadsheet files can accidentally leak private information when it opens a specially made file sent by an attacker.

Exploitation
Requires User Interaction
Attacker needs
User Interaction
Complexity
Low
Impact
Data Exposure
Component
Library
Class
XXE
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

The library parses .xlsx files (which are ZIP archives containing XML) with XML external entity resolution enabled by default, allowing crafted documents to read arbitrary local files or initiate outbound network requests during deserialization.

Why it matters to the business

Organizations that accept or process spreadsheet files from external parties risk unintended exposure of internal data or unintended network activity originating from the parsing system.

How an attack unfolds

An attacker creates a malicious .xlsx containing XML with external entity declarations that reference local files or internal services, then delivers the file to a target application or user that uses the vulnerable library to read it, causing the parser to resolve and potentially exfiltrate the referenced content.

How to fix it

Upgrade to a version containing commit 3b4905f428e1 or later; if upgrade is not possible, configure the parser to disable external entity resolution before loading any untrusted .xlsx content.

How to confirm the fix worked

Confirm the installed version is at or above the fixed commit; test by attempting to parse a minimal XXE-crafted .xlsx and verifying that external entity expansion is rejected or produces no sensitive output.

Typical attack path

  1. Attacker crafts .xlsx with XXE payload in sharedStrings.xml or other XML parts
  2. Malicious file is uploaded or opened by an application using the vulnerable library
  3. Library parses the XML with entity resolution enabled
  4. External entities are fetched, resulting in local file read or SSRF
  5. Attacker receives exfiltrated data via out-of-band channel or error responses

How to detect it

Inspect application logs for XML parser warnings, unexpected file reads, or outbound connections triggered during .xlsx processing; review any error messages containing references to file:// or internal resource paths.

What your security team should do

  • Prioritize upgrade of openpyxl to the fixed version in all environments that parse user-supplied spreadsheets
  • Add input validation or sandboxing around spreadsheet parsing code until patched
  • Review logs for any unexpected file-access or network requests during .xlsx processing

The record

Openpyxl 2.4.1 resolves external entities by default, which allows remote attackers to conduct XXE attacks via a crafted .xlsx document.

Affected packages

Ecosystem Package Introduced Fixed
PyPI openpyxl 0 2.4.1
PyPI openpyxl 0 2.4.2
Debian:11 openpyxl 0 2.3.0-3
Debian:12 openpyxl 0 2.3.0-3
Debian:13 openpyxl 0 2.3.0-3
Ubuntu:18.04:LTS openpyxl 0 2.4.9-1
Ubuntu:20.04:LTS openpyxl 0 2.4.9-1
Ubuntu:Pro:16.04:LTS openpyxl 0 2.3.0-1ubuntu0.1~esm1
openSUSE:Tumbleweed python-openpyxl 0 3.1.3-1.1
pypi openpyxl 2.4.1 No fix

Related vulnerabilities