From 53edf83c9617e6d8753954d58934f216a975ce38 Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Fri, 20 Mar 2026 14:13:11 +0100 Subject: [PATCH] gh-111264: Add a note about untrusted input to tomllib docs --- Doc/library/tomllib.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Doc/library/tomllib.rst b/Doc/library/tomllib.rst index 2bac968c2bea68..47323f56f6189e 100644 --- a/Doc/library/tomllib.rst +++ b/Doc/library/tomllib.rst @@ -19,6 +19,12 @@ support writing TOML. Added TOML 1.1.0 support. See the :ref:`What's New ` for details. +.. note:: + + Be cautious when parsing data from untrusted sources. + A malicious TOML string may cause the decoder to consume considerable + CPU and memory resources. + Limiting the size of data to be parsed is recommended. .. seealso::