SEVERITY NOT PROVIDED

GO-2026-7029: Unbounded memory allocation during BDAT transaction in github.com/emersion/go-smtp

Published 2026-11-23 · Updated 2026-11-23

Summary

A vulnerability in github.com/emersion/go-smtp allows remote clients to bypass connection line length limits during BDAT transactions. Software maintainers using affected versions of github.com/emersion/go-smtp should upgrade to version 0.25.1 to prevent denial of service caused by unbounded memory allocation.

Who is affected

Applications integrating github.com/emersion/go-smtp to handle SMTP connections are susceptible to unbounded memory consumption and denial of service. The vulnerability is triggered when a remote client sends another command between two BDAT commands before a BDAT LAST chunk or error occurs. This behavior causes Conn.handleBdat to bypass the Server.MaxLineLength restriction, allowing large payloads to be processed without line length limits.

Exploitability

CVSS vector and base score details are not provided for this flaw, and EPSS metrics are currently not available. The vulnerability is not documented as actively exploited according to the CISA Known Exploited Vulnerabilities catalog.

Remediation

How to check your project

Automated analysis of the published advisory data, generated 2026-11-23. Not human-reviewed; verify against the official advisory. How this works.

Affected packages

EcosystemPackageAffected versionsFixed inUpgrade
Go github.com/emersion/go-smtp >= 0.15.0, < 0.25.1 0.25.1 go get github.com/emersion/[email protected]

FAQ

What specific mechanism causes this vulnerability?

Conn.handleBdat disables the line length limit on the reader while reading a BDAT chunk and only restores it on an error or on the final BDAT LAST chunk. Sending an intermediate command between BDAT commands bypasses Server.MaxLineLength.

Is there a documented workaround available?

Not documented. Remediation requires updating the dependency to a non-vulnerable version.

Has this vulnerability been actively exploited in the wild?

Active exploitation is not documented; the vulnerability is marked as 'no' in the CISA Known Exploited Vulnerabilities catalog.

Original advisory description
Conn.handleBdat disables the line length limit on the connection reader while reading a BDAT chunk and only restored it on error or on the final BDAT LAST chunk. A remote client that sends another command between two BDAT commands in a transaction bypasses Server.MaxLineLength, allowing unbounded memory allocation and denial of service.

References

Source records: GO-2026-7029 (OSV.dev).