Repository navigation
Replies: 2 comments 1 reply
|
It is perhaps a bit unusual to have an |
|
Hi. I am not aware of any real life vulnerabilities that exploit this exact behaviour. However, I do think that there exist real life scenarios where tracking these implicit string concatenations is helpful. For example, assume a java application which has a deserialization vulnerability and a dependency on jackson-databind. It is known, that calling Thats where the snippet I posted above comes into play. I was looking for a way to reach the But I also want to add that this is not restricted to implicit ".toString". For example, passing an object of a class that implements "java.lang.Comparable" to "java.util.TreeSet.add()" will trigger the "compareTo" function of the object. This is not tracked (and I think similar points can be made for .equals, .hashCode and other methods): |
Uh oh!
There was an error while loading. Please reload this page.
Given the following code:
The following query finds the
execsink throughlist.toString();, but not viaString x = list + "";orjava.lang.String.valueOf(list);, which both trigger thetoStringmethod indirectly:Is this intended? Are there methods to modify this behaviour, without having to change the internal implementation?
Thanks in advance.
All reactions