Skip to content

Commit 3b42e8f

Browse files
author
Porcupiney Hairs
committed
Include changes from review
1 parent 794d9f7 commit 3b42e8f

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

python/ql/src/experimental/Security/CWE-094/Js2Py.qhelp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@
99
<recommendation>
1010
<p> This vulnerability can be prevented either by preventing an untrusted user input to flow
1111
to an <code>eval_js</code> call. Or, the impact of this vulnerability can be
12-
significantly reduced by disabling imports from the interepreted code. </p>
12+
significantly reduced by disabling imports from the interepreted code (note that in a <a
13+
href="https://github.com/PiotrDabkowski/Js2Py/issues/45#issuecomment-258724406">
14+
comment</a> the author of the library highlights that Js2Py is still insecure with this
15+
option).</p>
1316
</recommendation>
1417
<example>
1518
<p>In the example below, the Javascript code being evaluated is controlled by the user and

python/ql/src/experimental/Security/CWE-094/Js2Py.ql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,5 @@ from Js2PyFlow::PathNode source, Js2PyFlow::PathNode sink
3333
where
3434
Js2PyFlow::flowPath(source, sink) and
3535
not exists(API::moduleImport("js2py").getMember("disable_pyimport").getACall())
36-
select sink, source, sink, "This can lead to arbitrary code execution"
36+
select sink, source, sink, "This input to Js2Py depends on a $@.", source.getNode(),
37+
"user-provided value"

0 commit comments

Comments
 (0)