Document the security of tomllib for untrusted input #111264
Copy link
Copy link
Closed
Labels
3.11only security fixesonly security fixes3.12only security fixesonly security fixes3.13only security fixesonly security fixes3.14bugs and security fixesbugs and security fixes3.15bugs and security fixesbugs and security fixesdocsDocumentation in the Doc dirDocumentation in the Doc dirtype-securityA security issueA security issue
Description
Documentation
The documentation for tomllib should be explicit on whether untrusted input is safe to parse, or what features should be avoided.
Linked PRs
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
3.11only security fixesonly security fixes3.12only security fixesonly security fixes3.13only security fixesonly security fixes3.14bugs and security fixesbugs and security fixes3.15bugs and security fixesbugs and security fixesdocsDocumentation in the Doc dirDocumentation in the Doc dirtype-securityA security issueA security issue
Projects
- StatusShow more project fieldsTodo
Activity
hukkin commentedon Oct 10, 2024
In PR #96499
jsondocs added the warningas response to CVE-2020-10735 (cpython issue #95778).
The countermeasures already exist in v3.11.0 where
tomllibfirst appears so it's not vulnerable to that particular threat at least.encukou commentedon Mar 20, 2026
Let's add a similar note. Perhaps not as a warning -- it's more about communicating what to worry about when dealing with untrusted data (it might make the fan spin but won't format your disk), but also a reminder that you should think about how trusted your data is, plus a basic precaution.
pythongh-111264: Add a note about untrusted input to tomllib docs
gh-111264: Add a note about untrusted input to tomllib docs (GH-146209)
[3.14] gh-111264: Add a note about untrusted input to tomllib docs (G…
[3.13] gh-111264: Add a note about untrusted input to tomllib docs (#…