Log Forging with types different than string. #10454
-
Hello :), I would like to know why does this rule apply for parameters with types different than string. For example I have received an alert with high severity about a DateTime variable. It is formatted like this:
So there is no way of a malicious user to forge anything this way. I do not see any other way to sanitize that input other than formatting it. Could you please explain this to me? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Greetings, many thanks for raising this with us. It does indeed sound like there is an opportunity to reduce false positives on this query by enhancing our analysis to consider the types of variables flowing into the logs. I'll raise this with our C# analysis team so they can consider whether to prioritize making this change. |
Beta Was this translation helpful? Give feedback.
-
@WSkwieVolue : Could you provide a small piece of example code? Is the alert found in some ASP.NET code (you mention parameters)? |
Beta Was this translation helpful? Give feedback.
Greetings, many thanks for raising this with us. It does indeed sound like there is an opportunity to reduce false positives on this query by enhancing our analysis to consider the types of variables flowing into the logs. I'll raise this with our C# analysis team so they can consider whether to prioritize making this change.