Home › Vulnerabilities › PHPOffice
PHPWord flaws through 1.4.0 allow file exposure, request forgery and denial of service via crafted documents
Three vulnerabilities in PHPOffice PHPWord, all described as affecting versions through 1.4.0, were published together. The most severe, CVE-2026-142202 (HIGH, CVSS 7.2), is a path traversal that can expose and delete server files.
What to look into
- 3 vulnerabilities in PHPOffice PHPWord: 1 high, 2 medium (CVSS up to 7.2).
- None of them is known to be exploited yet.
- Start with CVE-2026-142202 (7.2 high): PHPOffice PHPWord through 1.4.0 contains a path traversal vulnerability in Element\Image::getImageString() and Writer\AbstractWriter::addFileToPackage() that allows attackers to read and delete arbit… An attacker with a normal user account can exploit this over the network, without any user action.
- 2 of 3 can be attacked over the network without logging in, 2 of them without anyone clicking anything.
- Kinds of flaws: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'); Server-Side Request Forgery (SSRF); Loop with Unreachable Exit Condition ('Infinite Loop').
Key points
- Path traversal (CVE-2026-142202, HIGH 7.2) can expose server files in output and delete web-writable files.
- SSRF in the Word2007 reader (CVE-2026-142203, MEDIUM 6.9) can reach attacker-chosen hosts, including internal ones.
- Infinite loop in Shared\OLERead (CVE-2026-142204, MEDIUM 6.9) can cause denial of service from a crafted .doc file.
- All three affect PHPWord through 1.4.0; no fixed version is named in the records.
The batch covers path traversal, server-side request forgery and an infinite loop. Each is triggered by feeding PHPWord a crafted document, and the records describe all three as affecting PHPOffice PHPWord through 1.4.0.
Highest severity: path traversal
CVE-2026-142202 (HIGH, CVSS 7.2) is the most serious item in the batch. Its record places the flaw in Element\Image::getImageString() and Writer\AbstractWriter::addFileToPackage(). According to the record, a .docx whose image relationship targets or zip entry names contain ../ sequences can cause server files to appear in converted output, and can cause files writable by the web server to be deleted.
Server-side request forgery
CVE-2026-142203 (MEDIUM, CVSS 6.9) affects the Word2007 reader. The record says that a document with w:pict images using TargetMode External can make functions such as filegetcontents() or getimagesize() contact attacker-chosen hosts, including internal addresses.
Denial of service
CVE-2026-142204 (MEDIUM, CVSS 6.9) is an infinite loop in Shared\OLERead. A legacy .doc file with cyclic sector chains can, per the record, make read(), getStream() and readData() loop indefinitely when loaded by the MsDoc reader, potentially exhausting PHP memory or CPU.
What the records do not say
None of the three records names a fixed version, a workaround or detection guidance. The sources do not state that any of these flaws is known to be exploited.
What to do
- Identify PHPWord installations at version 1.4.0 or earlier, which the records describe as affected.
- Check the PHPOffice project's advisories for a fixed release, since none is named in these records.
- Limit which files the web server can read and write, given the file read and deletion risk described in CVE-2026-142202.
- Review whether untrusted .docx and legacy .doc files reach PHPWord, since all three flaws are triggered by crafted input.
The 3 vulnerabilities
- CVE-2026-142202 7.2 PHPOffice PHPWord through 1.4.0 contains a path traversal vulnerability in Element\Image::getImageString() and Writer\AbstractWriter::addFileToPackage() that allows attackers to read and delete arbitrary files via crafted zip entry names.…
- CVE-2026-142203 6.9 PHPOffice PHPWord through 1.4.0 contains a server-side request forgery vulnerability in the Word2007 reader that allows attackers to trigger outbound requests via external VML image relationships. Attackers can supply a crafted .docx with…
- CVE-2026-142204 6.9 PHPOffice PHPWord through 1.4.0 contains an infinite loop vulnerability in Shared\OLERead that allows attackers to cause denial of service by supplying crafted legacy .doc files with cyclic sector chains. Attackers can submit an OLE compou…
Frequently asked questions
How many PHPOffice PHPWord vulnerabilities were published on December 2, 2026?
3 vulnerabilities: 1 high, 2 medium, with CVSS scores up to 7.2.
Are any of them being exploited?
None of them is in CISA's Known Exploited Vulnerabilities catalog yet.
Which one should be fixed first?
CVE-2026-142202 (CVSS 7.2): PHPOffice PHPWord through 1.4.0 contains a path traversal vulnerability in Element\Image::getImageString() and Writer\AbstractWriter::addFileToPackage() that allows attackers to read and delete arbit…