CVE-2026-39904 Details
Description
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.
A denial-of-service vulnerability has been identified in Gophish versions through 0.12.1. This issue allows authenticated users with the User role to exhaust server memory by uploading a specially crafted Office document as an email template attachment. The vulnerability arises in the ApplyTemplate() function within models/attachment.go, where Office documents are processed as ZIP archives. The function reads each file entry's uncompressed content into memory using ioutil.ReadAll() without any size restrictions. This oversight enables a zip bomb payload to decompress into several gigabytes of data, leading to excessive memory consumption and causing the application to be terminated by the operating system.
Gophish should implement size restrictions on uncompressed data read from user-uploaded ZIP archives. Before processing any ZIP file entries, the application must validate both compressed and uncompressed sizes, rejecting files that exceed a specified limit. Additionally, replace the direct use of ioutil.ReadAll() with an io.LimitedReader to enforce strict size limits, such as 50MB per entry. Safeguards against zip bombs should also be introduced by monitoring the cumulative extracted size and limiting the total number of files processed from an archive.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Jun 22, 2026CISA-ADP
Assessed Jun 23, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-770 | Allocation of Resources Without Limits or Throttling | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| GoPhish | <v0.12.1 (semver) |
CPE
Remediation
| |
Change History
3 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jul 14, 2026 | CVE Modified | [email protected] |
| Jun 23, 2026 | CVE Modified | CISA-ADP |
| Jun 22, 2026 | New CVE Received | [email protected] |
Volerion