CVE-2026-39904: Gophish 0.12.1 Denial of Service via Office Document Upload
Gophish through 0.12.1 contains a denial of service vulnerability that allows authenticated users with the User role to exhaust server memory by uploading a crafted Office document as an email template attachment. The ApplyTemplate() function in models/attachment.go processes Office documents as ZIP archives and calls ioutil.ReadAll() on each contained file entry without enforcing size restrictions on uncompressed content, allowing a zip bomb payload to expand to several gigabytes in memory and cause the process to be terminated by the operating system.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
gophishto a version that resolves this vulnerability.Fixed in 0.12.1 - Compensating control
Restrict authenticated User role access so they cannot upload email template attachments (Office documents) that are processed by ApplyTemplate() in models/attachment.go.
Event History
Frequently Asked Questions
What is the severity of CVE-2026-39904?
CVE-2026-39904 has a medium severity rating of 6.5.
How do I fix CVE-2026-39904?
To mitigate CVE-2026-39904, upgrade to a patched version of Gophish that addresses this denial of service vulnerability.
Who is affected by CVE-2026-39904?
Authenticated users with the User role in Gophish versions up to 0.12.1 are affected by CVE-2026-39904.
What kind of vulnerability is CVE-2026-39904?
CVE-2026-39904 is a denial of service vulnerability that allows resource exhaustion through crafted Office document uploads.
When was CVE-2026-39904 published?
CVE-2026-39904 was published on June 22, 2026.