Repository navigation
Release v1.7.1
v1.7.1
Changelog
Security
- HTML image filter bypass via HTML entities (SSRF / local file read).
HtmlImageSanitizerlooked for<imgbefore
decoding entities, while PHPWord decodes them before parsing, so<img src="http://…"/>reached
Html::parseImage()(file_get_contents()on any URL or stream wrapper, files outsideallowed_rootsembedded in the
output). The filter now runs on the same decoded XML PHPWord parses, and an unparsable fragment that contains an image
is dropped (fail closed). AffectsHtmlContentvalues built from untrusted HTML, 1.5.0–1.7.0 (REQ-SEC-004 re-audit M1,
CWE-918 / CWE-180).
Changed
phpoffice/phpwordfloor raised to^1.4(keepsphpoffice/math0.2 with GHSA-42hm-pq2f-3r7m out of the tree).
What's Changed
- fix(security): filter HTML images after entity decoding by @HecFranco in #11
Full Changelog: v1.7.0...v1.7.1