<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:webfeeds="http://webfeeds.org/rss/1.0"><channel><title>PhpSpreadsheet (&gt;= 3.3.0, &lt;= 3.10.7) - CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/products/phpspreadsheet--3.3.0--3.10.7/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata. Fed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Sun, 01 Nov 2026 20:48:33 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/products/phpspreadsheet--3.3.0--3.10.7/feed.xml" rel="self" type="application/rss+xml"/><image><url>https://feed.craftedsignal.io/favicon-32x32.png</url><title>CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/</link><width>32</width><height>32</height></image><webfeeds:icon>https://feed.craftedsignal.io/favicon.svg</webfeeds:icon><item><title>PhpSpreadsheet: XmlScanner TOCTOU bypass leading to XXE and DoS (CVE-2026-108357)</title><link>https://feed.craftedsignal.io/briefs/2026-11-phpspreadsheet-xxe-dos/</link><pubDate>Sun, 01 Nov 2026 20:48:33 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-11-phpspreadsheet-xxe-dos/</guid><description>A TOCTOU vulnerability in PhpSpreadsheet allows attackers to bypass XML security filters via double-encoded numeric entities, enabling XXE and Denial of Service attacks.</description><content:encoded><![CDATA[<p>PhpSpreadsheet contains a Time-of-Check Time-of-Use (TOCTOU) vulnerability (CVE-2026-108357) in its <code>XmlScanner::scan()</code> method. The scanner performs two sequential passes over input data, but the <code>unentity()</code> callback - which decodes HTML entities - executes <em>after</em> the security pattern check in both passes. By using double-encoded numeric entities (e.g., <code>&amp;#38;#60;</code>), an attacker can hide <code>&lt;!DOCTYPE</code> declarations from the security filter. The first pass decodes the entity into a single-encoded format, and the second pass completes the decoding, resulting in a malicious <code>&lt;!DOCTYPE</code> payload that the XML parser then executes.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>Attacker crafts a malicious SpreadsheetML XML file containing double-encoded entities (e.g., <code>&amp;#38;#60;</code> for <code>&lt;</code>).</li>
<li>The <code>Reader\Xml</code> component passes the raw file content to <code>XmlScanner::scan()</code>.</li>
<li><code>XmlScanner::scan()</code> performs a pattern match on the raw input; the malicious <code>&lt;!DOCTYPE</code> remains hidden.</li>
<li>The <code>unentity()</code> callback executes <code>html_entity_decode()</code>, converting the double-encoded entity to a single-encoded entity.</li>
<li>The partially decoded XML is stored in <code>Xml::$fileContents</code>.</li>
<li>The <code>Xml</code> reader initiates a second scan pass, which also fails to match the pattern because the entity is only partially decoded.</li>
<li>The <code>unentity()</code> callback executes again, converting the single-encoded entity into the raw <code>&lt;</code> character.</li>
<li><code>simplexml_load_string()</code> processes the final, now-malicious XML, triggering entity expansion (DoS) or XXE.</li>
</ol>
<h2 id="impact">Impact</h2>
<ul>
<li><strong>Denial of Service:</strong> Exploitation causes quadratic memory blowup via entity expansion.</li>
<li><strong>Information Disclosure:</strong> XXE/SSRF allows unauthorized reading of local files or internal network resources, specifically on PHP versions &lt; 8.0 or when <code>LIBXML_NOENT</code> is enabled.</li>
</ul>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade PhpSpreadsheet to a patched version once available from PHPOffice.</li>
<li>Audit applications that use <code>PhpOffice\PhpSpreadsheet\Reader\Xml</code> to identify intake points for user-supplied SpreadsheetML files.</li>
<li>Implement file-type validation and strictly forbid <code>LIBXML_NOENT</code> if using older PHP environments.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category></item></channel></rss>