@@ -53,11 +53,22 @@ XML security
5353
5454An attacker can abuse XML features to carry out denial of service attacks,
5555access local files, generate network connections to other machines, or
56- circumvent firewalls.
57-
58- Expat versions lower than 2.6.0 may be vulnerable to "billion laughs",
59- "quadratic blowup" and "large tokens". Python may be vulnerable if it uses such
60- older versions of Expat as a system-provided library.
56+ circumvent firewalls when attacker-controlled XML is being parsed,
57+ in Python or elsewhere.
58+
59+ The built-in XML parsers of Python rely on the library `libexpat `_, commonly
60+ called Expat, for parsing XML.
61+
62+ By default, Expat itself does not access local files or create network
63+ connections.
64+
65+ Expat versions lower than 2.7.2 may be vulnerable to the "billion laughs",
66+ "quadratic blowup" and "large tokens" vulnerabilities, or to disproportional
67+ use of dynamic memory.
68+ Python bundles a copy of Expat, and whether Python uses the bundled or a
69+ system-wide Expat, depends on how the Python interpreter
70+ :option: `has been configured <--with-system-expat> ` in your environment.
71+ Python may be vulnerable if it uses such older versions of Expat.
6172Check:const: `!pyexpat.EXPAT_VERSION `.
6273
6374:mod: `xmlrpc ` is **vulnerable ** to the "decompression bomb" attack.
@@ -90,5 +101,6 @@ large tokens
90101 be used to cause denial of service in the application parsing XML.
91102 The issue is known as:cve: `2023-52425 `.
92103
104+ .. _libexpat :https://github.com/libexpat/libexpat
93105.. _Billion Laughs :https://en.wikipedia.org/wiki/Billion_laughs
94106.. _ZIP bomb :https://en.wikipedia.org/wiki/Zip_bomb