Skip to content

Commit 440bcb9

Browse files
authored
gh-141994: Warn of XXE vulnerability in documentation of SAX feature xml.sax.handler.feature_external_ges (GH-141996)
Doc/library/xml.sax.handler.rst: Warn of XXE with feature_external_ges Related to commit baa9f33
1 parent 5e749d3 commit 440bcb9

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

Doc/library/xml.sax.handler.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,14 @@ for the feature and property names.
9696

9797
.. data:: feature_external_ges
9898

99+
.. warning::
100+
101+
Enabling opens a vulnerability to
102+
`external entity attacks <https://en.wikipedia.org/wiki/XML_external_entity_attack>`_
103+
if the parser is used with user-provided XML content.
104+
Please reflect on your `threat model <https://en.wikipedia.org/wiki/Threat_model>`_
105+
before enabling this feature.
106+
99107
| value: ``"http://xml.org/sax/features/external-general-entities"``
100108
| true: Include all external general (text) entities.
101109
| false: Do not include external general entities.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
:mod:`xml.sax.handler`: Make Documentation of
2+
:data:`xml.sax.handler.feature_external_ges` warn of opening up to `external
3+
entity attacks <https://en.wikipedia.org/wiki/XML_external_entity_attack>`_.
4+
Patch by Sebastian Pipping.

0 commit comments

Comments
 (0)