Python: Fix huge_tree modeling

This commit is contained in:
Rasmus Wriedt Larsen
2022-03-04 09:49:00 +01:00
parent d6cbfec434
commit f0131afc54
2 changed files with 3 additions and 2 deletions

View File

@@ -47,7 +47,7 @@ lxml.etree.fromstring(x, parser=parser) # $ input=x vuln='Billion Laughs' vuln='
# Safe for both Billion laughs and XXE
parser = lxml.etree.XMLParser(resolve_entities=False, huge_tree=True)
lxml.etree.fromstring(x, parser=parser) # $ input=x SPURIOUS: vuln='Billion Laughs' vuln='Quadratic Blowup'
lxml.etree.fromstring(x, parser=parser) # $ input=x
# DTD retrival vuln (also XXE)
parser = lxml.etree.XMLParser(load_dtd=True, no_network=False)