CVE-2026–39904: How I Crashed an Entire Server Using Nothing but a DOCX File?
GoPhish v0.12.1 reads each file inside an uploaded Office document into memory without any size limit, so a ZIP bomb disguised as a .docx expands to several gigabytes and exhausts server memory. A low-privileged authenticated user could upload such a file and crash the entire GoPhish process, denying service to all users including administrators.
For those who are reading my articles for the first time, I’m Ashik Mohamed (ashikmd7), and I currently work as an Application Security Engineer at CircleLytics, a Netherlands-based SaaS companyspecializing in collective intelligence & collaborative decision-making.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
The attachment processing code uses ioutil.ReadAll() to read each decompressed archive entry into memory without enforcing any size limit, allowing a ZIP bomb to exhaust available memory.
Impact
A low-privileged authenticated user can cause a complete denial of service, crashing the entire GoPhish process and making the management interface inaccessible to all users, including administrators, until the service is manually restarted.
What the attacker needed
A low-privileged authenticated account; ability to create email templates; ability to upload attachments
The fix
The application should validate compressed and uncompressed sizes before reading archive entries, track cumulative extraction size, and use io.LimitedReader instead of ioutil.ReadAll() to enforce strict size limits.
How it was found
- Generate a file containing several gigabytes of null bytes and compress it into a ZIP archive.
- Rename the archive to .docx.
- Log into GoPhish and navigate to the Email Template creation page.
- Upload the crafted .docx file as an attachment and click Save Template.
- Observe memory consumption spike until the operating system kills the GoPhish process.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
Office documents like .docx are actually ZIP archives containing several files. GoPhish unpacks each of those files into memory without checking how big they are, so a tiny upload that expands to gigabytes can use up all the server's memory. When memory runs out, the operating system kills the GoPhish process, taking the whole service offline for everyone.
What is DoS?
A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.