Vulnerabilities in pkg:golang/github.com/wneessen/go-mail
PACKAGECVE-2025-59937 is a HIGH go-mail has insufficient address encoding vulnerability (CWE-88: Improper Neutralization of Argument Delimiters in a Command ('Argument Injection')) affecting Github.com/wneessen/go mail libraries in the Go ecosystem. The issue involves go-mail has insufficient address encoding when passing mail addresses to the smtp client. Remediation is available by upgrading affected packages to version 0.7.1.
pkg:golang/github.com/wneessen/go-mail
Vulnerability advisories affecting package pkg:golang/github.com/wneessen/go-mail. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-wpwj-69cm-q9c5 | CVE-2025-59937 | HIGH | go-mail has insufficient address encoding when passing mail addresses to the SMTP client |
CVE-2025-59937 at a Glance
How to Fix CVE-2025-59937
To remediate this vulnerability, upgrade all affected Github.com/wneessen/go mail dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/wneessen/go-mail to 0.7.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/wneessen/go-mail
How to Check if You Are Affected
To determine whether your application is affected by CVE-2025-59937, inspect your project dependencies for Github.com/wneessen/go mail:
inspect dependencies for github.com/wneessen/go-mail
Analyze the terminal output to locate any version of Github.com/wneessen/go mail in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.7.1), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-88: Improper Neutralization of Argument Delimiters in a Command ('Argument Injection'), where the product constructs a string for a command to be executed by a separate component in another control sphere, but it does not properly delimit the intended arguments, options, or switches within that command string. In Github.com/wneessen/go mail, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-59937 Affected Github.com/wneessen/go mail Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/wneessen/go-mail
|
Go |
< 0.7.1
|
0.7.1
|
References
Frequently Asked Questions
What is CVE-2025-59937?
Which Github.com/wneessen/go mail versions are affected?
What version fixes CVE-2025-59937?
Is github.com/wneessen/go-mail affected?
What CWE is associated with CVE-2025-59937?
How can I check Go dependencies for CVE-2025-59937?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-wpwj-69cm-q9c5",
"modified" : "2025-11-05T22:01:58Z",
"published" : "2025-09-29T16:28:58Z",
"aliases" : [ "CVE-2025-59937" ],
"summary" : "go-mail has insufficient address encoding when passing mail addresses to the SMTP client",
"details" : "### Impact\nDue to incorrect handling of the `mail.Address` values when a sender- or recipient address is passed to the corresponding `MAIL FROM` or `RCPT TO` commands of the SMTP client, this could lead to a possible wrong address routing or even to ESMTP parameter smuggling.\n\n#### Vulnerability details\nInstead of making use of the `String()` method of `mail.Address`, which takes care of proper escaping and quotation of mail address, we used the `Address` value of the `mail.Address` which is the raw value when passing it to our SMTP client.\n\nThis meant, if a mail address like this was set: `\"toni.tester@example.com> ORCPT=admin@admin.com\"@example.com` for a sender or recipient, instead of the correctly quoted/escaped address, the SMTP client would get the raw value passed which would translate into something like this being passed to the SMTP server: `RCPT TO:<toni.tester@example.com> ORCPT=admin@admin.com@example.com>`. \n\nSince ORCTP is a valid command for the SMTP server, the mail would be routed to the wrong address. Additionally, other SMTP commands could potientially be smuggled in using this method causing unexpected behaviour.\n\n#### Exploitation requirements\nFor successful exploitation of this vulnerability it is required that the user's code is allowing for arbitrary mail address input (i. e. through a web form or similar). If only static mail addresses are used (i. e. in a config file) and the mail addresses in use do not consist of quoted local parts, this should not affect your code.\n\n### Patches\nThe vulnerability has been fixed with PR #496 and the fix has been shipped with the go-mail v0.7.1 release.\n\nIssue #495 holds the full report and discussion.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/wneessen/go-mail"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.7.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/wneessen/go-mail/security/advisories/GHSA-wpwj-69cm-q9c5"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-59937"
}, {
"type" : "WEB",
"url" : "https://github.com/wneessen/go-mail/issues/495"
}, {
"type" : "WEB",
"url" : "https://github.com/wneessen/go-mail/pull/496"
}, {
"type" : "WEB",
"url" : "https://github.com/wneessen/go-mail/commit/42e92cfe027be04aff72921adb0f72f11d517479"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/wneessen/go-mail"
}, {
"type" : "WEB",
"url" : "https://pkg.go.dev/vuln/GO-2025-3988"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-88" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2025-09-29T16:28:58Z",
"nvd_published_at" : "2025-09-29T23:15:31Z"
}
}