From 90b42c3caf48a3964b32d9e14d14864470e50797 Mon Sep 17 00:00:00 2001 From: Stan Ulbrych Date: Sun, 18 Oct 2026 11:44:24 +0100 Subject: [PATCH] Add a security warning to the `mailbox` docs (GH-149295) (cherry picked from commit c5cbe312ca3272022378f11b15349d3ea4ff028e) Co-authored-by: Stan Ulbrych Co-authored-by: R. David Murray --- Doc/library/mailbox.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Doc/library/mailbox.rst b/Doc/library/mailbox.rst index ed135bf02cb968..4ec5d383128985 100644 --- a/Doc/library/mailbox.rst +++ b/Doc/library/mailbox.rst @@ -18,6 +18,12 @@ accessing and manipulating on-disk mailboxes and the messages they contain. :class:`~email.message.Message` class with format-specific state and behavior. Supported mailbox formats are Maildir, mbox, MH, Babyl, and MMDF. +.. warning:: + + The :mod:`!mailbox` module is designed for use in trusted environments, + where data from untrusted sources is never passed to the module's API + calls and only trusted users have access to the filesystems accessible + to the module. .. seealso::