Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

system.net.http.formatting.dll veracode finding : Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection') (CWE ID 470)(1 flaw) #428

Open
mtoha2013 opened this issue Oct 24, 2024 · 0 comments

Comments

@mtoha2013
Copy link

dear Team,

This dll is having issue found by veracode scan..

Can you help to make updated release, to solve this issue?

I can describe you some information of the finding:

Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection') (CWE ID 470)(1flaw)
Description
A call uses reflection in an unsafe manner. An attacker can specify the class name to be instantiated, which may create
unexpected control flow paths through the application. Depending on how reflection is being used, the attack vector
may allow the attacker to bypass security checks or otherwise cause the application to behave in an unexpected
manner. Even if the object does not implement the specified interface and a ClassCastException is thrown, the
constructor of the untrusted class name will have already executed.

Recommendations
Validate the class name against a combination of white and black lists to ensure that only expected behavior is
produced.

Instances found via Static Scan
Flaw Id : 804
Module # : -
Class # : 4
Module : system.net.http.formatting.dll
Location : object GetDefaultValueForType(System.Type) 91%

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant