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

- Database: Go
- Published: 2026-11-23
- Modified: 2026-11-23

## Affected versions

- github.com/emersion/go-smtp (Go): from 0.15.0, fixed in 0.25.1

## 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

- https://github.com/emersion/go-smtp/commit/eb903bcc09670a2b04a7b5f210c29c465289df1a
- https://github.com/golang/vulndb/issues/7029
- https://github.com/emersion/go-smtp/releases/tag/v0.25.1

Page: https://cve.now/GO-2026-7029

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
