[dotnet] Missing Taint Flow from [WebMethod] Parameter Objects to Properties/Fields
#21567
Unanswered
Hug0Vincent
asked this question in
Q&A
Replies: 2 comments 1 reply
This comment has been minimized.
This comment has been minimized.
-
|
I think I found the issue but I don't know how to fix it, here this class does not have associated I found an example for ASP.NET Core here but it's not transitive. It's possible to have something like this: public class AddresDto
{
public string City {get; set;}
}
public class UserDto
{
public AddresDto Address {get; set;}
} Also the I tried to make a fix but it need some recursion to get a property of a property. So I think it would be easier to taint outputs of getters like in spring and Java. It's internal CodeQL code so I don't know how to approach this. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
In ASP.NET Legacy Web Services (System.Web.Services), parameters decorated with the [WebMethod] attribute are correctly identified as RemoteFlowSource. However, the TaintTracking engine fails to propagate taint from the parameter object itself to its properties or fields during an assignment.
When running a global taint-tracking query, the flow starts at the data parameter but terminates immediately at the property access data.Payload. The variable cmd is not marked as tainted.
Here is my partial dataflow query:
Adding the isAdditionalFlowStep resolves the issue. Is it a normal behavior ?
For Java there is this method localAdditionalTaintExprStep, and I think it would be nice to do the same for csharp. I see references to spring in this file and I think it's a bit similar to ASP.NET in some way.
Beta Was this translation helpful? Give feedback.
All reactions