I'm trying out Azure Durable Functions and I need to pass an external class as input/output between the Activity Functions. This class comes from an external SDK and it contains abstract classes & interfaces. Because of this, the function throws an error described here
I've been reading some articles & SO posts about the vulnerabilities that TypeNameHandling.All may create but I played around with it. And when the object type is specified during Deserialization, the application throws an error BEFORE the constructor code of the targeted class is executed. Looking at this it seems that the implementation is pretty safe since the application will throw an exception if an attacker tries to pass a JSON with an unexpected type. See the code here https://dotnetfiddle.net/9FvSrc
Am I missing something here? In which scenario would the attacker be able to execute the constructor/ setter code?