File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed
python/ql/lib/semmle/python/frameworks Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -129,11 +129,6 @@ module Lxml {
129
129
any ( True t )
130
130
)
131
131
or
132
- kind .isXmlBomb ( ) and
133
- this .getKeywordParameter ( "huge_tree" ) .getAValueReachingSink ( ) .asExpr ( ) = any ( True t ) and
134
- not this .getKeywordParameter ( "resolve_entities" ) .getAValueReachingSink ( ) .asExpr ( ) =
135
- any ( False t )
136
- or
137
132
kind .isDtdRetrieval ( ) and
138
133
this .getKeywordParameter ( "load_dtd" ) .getAValueReachingSink ( ) .asExpr ( ) = any ( True t ) and
139
134
this .getKeywordParameter ( "no_network" ) .getAValueReachingSink ( ) .asExpr ( ) = any ( False t )
@@ -305,9 +300,8 @@ module Lxml {
305
300
// note that there is no `resolve_entities` argument, so it's not possible to turn off XXE :O
306
301
kind .isXxe ( )
307
302
or
308
- kind .isXmlBomb ( ) and
309
- this .getKeywordParameter ( "huge_tree" ) .getAValueReachingSink ( ) .asExpr ( ) = any ( True t )
310
- or
303
+ // libxml2 has built-in protection against XML bombs via entity reference loop detection,
304
+ // so lxml is not vulnerable to XML bomb attacks.
311
305
kind .isDtdRetrieval ( ) and
312
306
this .getKeywordParameter ( "load_dtd" ) .getAValueReachingSink ( ) .asExpr ( ) = any ( True t ) and
313
307
this .getKeywordParameter ( "no_network" ) .getAValueReachingSink ( ) .asExpr ( ) = any ( False t )
You can’t perform that action at this time.
0 commit comments