File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
python/ql/src/experimental
semmle/python/security/injection Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 7
7
</overview >
8
8
<recommendation >
9
9
<p >
10
- This vulnerability can be prevented by not allowing untrusted user input to be passed as a XSL stylesheet.
10
+ This vulnerability can be prevented by not allowing untrusted user input to be passed as an XSL stylesheet.
11
11
If the application logic necessiates processing untrusted XSL stylesheets, the input should be properly filtered and sanitized before use.
12
12
</p >
13
13
</recommendation >
Original file line number Diff line number Diff line change @@ -41,22 +41,23 @@ module XSLTInjection {
41
41
}
42
42
43
43
private predicate etreeXML ( ControlFlowNode fromnode , CallNode tonode ) {
44
+ // etree.XML("<xmlContent>")
44
45
exists ( CallNode call | call .getFunction ( ) .( AttrNode ) .getObject ( "XML" ) .pointsTo ( etree ( ) ) |
45
46
call .getArg ( 0 ) = fromnode and
46
47
call = tonode
47
48
)
48
49
}
49
50
50
51
private predicate etreeFromString ( ControlFlowNode fromnode , CallNode tonode ) {
51
- // fromstring(text, parser=None)
52
+ // etree. fromstring(text, parser=None)
52
53
exists ( CallNode call | call .getFunction ( ) .( AttrNode ) .getObject ( "fromstring" ) .pointsTo ( etree ( ) ) |
53
54
call .getArg ( 0 ) = fromnode and
54
55
call = tonode
55
56
)
56
57
}
57
58
58
59
private predicate etreeFromStringList ( ControlFlowNode fromnode , CallNode tonode ) {
59
- // fromstringlist(strings, parser=None)
60
+ // etree. fromstringlist(strings, parser=None)
60
61
exists ( CallNode call |
61
62
call .getFunction ( ) .( AttrNode ) .getObject ( "fromstringlist" ) .pointsTo ( etree ( ) )
62
63
|
You can’t perform that action at this time.
0 commit comments