Vanara is vulnerable to Untrusted Search Path
64
Medium Risk
Vanara assemblies use P/Invoke to load native Windows DLLs. Without an assembly-level search-path restriction, the .NET runtime resolves these DLLs using the default search order, which includes the application directory. An attacker who can place a malicious DLL with the same name in a directory searched before System32 can cause the application to load it, leading to local code execution. The fix adds [assembly: DefaultDllImportSearchPaths(DllImportSearchPath.System32)] in the shared AsmDef.cs so all built assemblies restrict native DLL resolution to the system directory, preventing DLL search-order hijacking.
You are affected if you are using a version that falls within the vulnerable range.
Vanara is vulnerable to Untrusted Search Path in versions 0.0.1 - 5.0.0.
Upgrade the Vanara library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant