Replies: 1 comment 1 reply
-
I think the answer is that the unsafe-deserialization query finds that vulnerable use-site alright, but all the relevant sources of untrusted information within JFinal are in the core module (e.g., reading HTTP header parameters), while the unsafe code could only be reached via Another way to say that is, we don't know from the code of JFinal alone what your threat model is: is the stuff stored in Redis safe (you sanitized it on its way into the database), in which case it's fine to deserialize it to an arbitrary object, or is it potentially dangerous? In general something like this would be handled by customising the query to regard |
Beta Was this translation helpful? Give feedback.
-
I'm running pre-defined query to detect a identified CWE-502 vulnerability jfinal/jfinal#184. The root cause of this issue is clear, as it use the
readObject
function without any extra operations. But I got a blank result after I ran the pre-defined query. I took a look at the implementation, and I tried this predicate which worked well.codeql/java/ql/lib/semmle/code/java/security/UnsafeDeserializationQuery.qll
Lines 148 to 235 in 5b1cae5
Beta Was this translation helpful? Give feedback.
All reactions